Beispiel #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);
            var mapControl = FindViewById <MapView>(Resource.Id.mapcontrol);

            mapControl.Map.Layers.Add(new TileLayer(KnownTileSources.Create())
            {
                Name = "OSM"
            });
            mapControl.Map.Layers.Add(LineStringSample.CreateLineStringLayer(LineStringSample.CreateLineStringStyle()));
            mapControl.Map.Layers.Add(PointsSample.CreateRandomPointLayer(mapControl.Map.Envelope,
                                                                          style: PointsSample.CreateBitmapStyle("Mapsui.Samples.Common.Images.ic_place_black_24dp.png")));
            mapControl.Map.Layers.Add(PointsSample.CreateBitmapPointLayer());

            mapControl.Map.Viewport.RenderResolutionMultiplier = 2;
        }