protected override void OnCreate(Android.OS.Bundle savedInstanceState) { base.OnCreate(savedInstanceState); AddOnlineBaseLayer(CartoBaseMapStyle.CartoBasemapStyleGray); JsonValue config = JsonUtils.VectorLayerConfigJson; MapView.ConfigureAnonymousVectorLayers(config); // Animate map to the content area MapPos newYork = MapView.Options.BaseProjection.FromWgs84(new MapPos(-74.0059, 40.7127)); MapView.SetFocusPos(newYork, 1); MapView.SetZoom(15, 1); }
public override void ViewDidLoad() { base.ViewDidLoad(); AddOnlineBaseLayer(CartoBaseMapStyle.CartoBasemapStylePositron); JsonValue config = JsonUtils.VectorLayerConfigJson; MapView.ConfigureAnonymousVectorLayers(config); // Animate map to the content area MapPos newYork = MapView.Options.BaseProjection.FromWgs84(new MapPos(-74.0059, 40.7127)); MapView.SetFocusPos(newYork, 1); MapView.SetZoom(15, 1); }