public MainWindow() { InitializeComponent(); MapControl.Map.Layers.Add(OsmTilesSample.CreateLayer()); MapControl.Map.Layers.Add(MbTilesSample.CreateLayer(new SQLitePlatformWin32(), ".\\Data\\test.mbtiles")); MapControl.Map.Layers.Add(LineStringSample.CreateLayer()); MapControl.Map.Layers.Add(CitiesLayerSample.CreateLayer()); MapControl.Map.Layers.Add(new CurrentLocationLayer()); MapsuiLayerList.Initialize(MapControl.Map.Layers); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); Setup.Do(); SetContentView(Resource.Layout.Main); var mapControl = FindViewById <MapControl>(Resource.Id.mapcontrol); mapControl.Map.Layers.Add(OsmTilesSample.CreateLayer()); //mapControl.Map.Layers.Add(MbTilesSample.CreateLayer(new SQLitePlatformAndroid(), Setup.DatabasePath)); mapControl.Map.Layers.Add(LineStringSample.CreateLayer()); mapControl.Map.Layers.Add(CitiesLayerSample.CreateLayer()); mapControl.AddMarker(new Marker(mapControl.Context) { GeoPosition = SphericalMercator.FromLonLat(4.9, 52.366667) }); mapControl.AddMarker(MarkerSample.CreateCustomMarker(mapControl.Context)); mapControl.ShowCurrentLocation = true; mapControl.Map.Viewport.RenderResolutionMultiplier = 2; }