xamarin.forms - Mapfragement error in xamarin map -
i getting error:
severity code description project file line suppression state error cs1061 'mapfragment' not contain definition 'map' , no extension method 'map' accepting first argument of type 'mapfragment' found (are missing using directive or assembly reference?) mymap f:\applications\gpslocationmap\gpslocationmap\mymap\mainactivity.cs 59 active
public void initializemap(double latitude,double longitude) { latlng location = new latlng(latitude, longitude); // setting latitude , longitude // getting mapfragment mapfrag = (mapfragment)fragmentmanager.findfragmentbyid(resource.id.map); // setting mapfragment googlemap variable google = mapfrag.map; if (google != null) { google.maptype = googlemap.maptypenormal; // setting map type // creating marker markeroptions marker = new markeroptions() .setposition(new latlng(latitude, longitude)) .settitle("android codec"); //positioning camera according marker cameraposition.builder builder = cameraposition.invokebuilder(); builder.target(location); builder.zoom(15); builder.bearing(155);
Comments
Post a Comment