Example #1
0
        public MapView()
        {
            InitializeComponent();

            var ubication = new Point(-3.7025600, 40.4165000);
            var sphericalMercatorCoordinate = SphericalMercator.FromLonLat(ubication.X, ubication.Y);

            var mapControl = new MapsUIView();


            mapControl.NativeMap.NavigateTo(sphericalMercatorCoordinate);
            mapControl.NativeMap.Layers.Add(OpenStreetMap.CreateTileLayer());
            mapControl.NativeMap.NavigateTo(mapControl.NativeMap.Resolutions[9]);



            var layer = GenerateIconLayer();

            mapControl.NativeMap.Layers.Add(layer);
            mapControl.NativeMap.InfoLayers.Add(layer);

            ContentGrid.Children.Add(mapControl);

            mapControl.NativeMap.Info += (sender, args) =>
            {
                var layername    = args.MapInfo?.Layer.Name;
                var featureLabel = args.MapInfo.Feature?["Label"]?.ToString();
                var featureType  = args.MapInfo.Feature?["Type"]?.ToString();

                if (featureType != null && featureType.Equals("Point"))
                {
                    ShowPopup(featureLabel);
                }
            };
        }
Example #2
0
        public static Map CreateMap()
        {
            var map = new Map();

            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            return(map);
        }
Example #3
0
        public static Map CreateMap(IMapControl mapControl)
        {
            var style = new SymbolStyle()
            {
                Fill = new Brush(Color.Red), SymbolScale = 1,
            };

            var map = new Map();

            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            map.Layers.Add(CreateLayer(style));

            var animations = CreateAnimationsForSymbolStyle(style);

            // todo: Introduce one Animation for the MapControl that could be reused here.
            var animation = new Animation();

            animation.Ticked += (s, e) =>
            {
                animation.UpdateAnimations();
                mapControl.Refresh();
            };
            animation.Start(animations, 10000);

            return(map);
        }
Example #4
0
        public void ReplaceLayer(KnownTileSource tileSource)
        {
            if (activeLayer != null)
            {
                mapView.Map.Layers.Remove(activeLayer);
                activeLayer = null;
            }

            var api = "";

            switch (tileSource)
            {
            case KnownTileSource.OpenCycleMap:
            case KnownTileSource.ThunderforestTransport:
            case KnownTileSource.ThunderforestOutdoors:
            case KnownTileSource.ThunderforestLandscape:
                api = Secrets.ThunderforestSDKToken;
                break;

            case KnownTileSource.BingAerial:
            case KnownTileSource.BingHybrid:
            case KnownTileSource.BingRoads:
                api = Secrets.UwpMapSDKToken;
                break;
            }

            activeLayer            = OpenStreetMap.CreateTileLayer();
            activeLayer.TileSource = KnownTileSources.Create(tileSource, api);
            mapView.Map.Layers.Add(activeLayer);
        }
Example #5
0
        public MapPage()
        {
            InitializeComponent();

            SataticPoints = new List <Point>();
            Point point = SphericalMercator.FromLonLat(34.7609650, 32.0477280);

            SataticPoints.Add(point);

            mapView.MoveToCenter(new Position(32.0477280d, 34.7609650d));
            mapView.PropertyChanged += (s, e) => System.Diagnostics.Debug.WriteLine(e.PropertyName);
            mapView.Map.Layers.Add(OpenStreetMap.CreateTileLayer());

            SataticPoints.Add(new Point(mapView.Map.Envelope.Left, mapView.Map.Envelope.Bottom));
            SataticPoints.Add(new Point(mapView.Map.Envelope.Right, mapView.Map.Envelope.Top));
            //mapView.Map.Layers.Add(CreatePolygonLayer());
            //mapView.Map.Layers.Add(CreateLayerWithStyleOnLayer(mapView.Map.Envelope, 10));
            mapView.Map.Layers.Add(CreateLayerWithStyleOnFeature(mapView.Map.Envelope, 10));


            //mapView.Map.Layers.Add(new TileLayer(KnownTileSources.Create(KnownTileSource.OpenStreetMap)) { Name = "Open Street Map" });
            //mapView.Map.Widgets.Add(new ScaleBarWidget {

            mapView.Map.Viewport.ViewportChanged += (s, e) => System.Diagnostics.Debug.WriteLine(e.PropertyName);
        }
Example #6
0
        private void InitializeMapControl()
        {
            map     = mapControl.Map;
            map.CRS = MapCrs;
            Activity.RunOnUiThread(() =>
            {
                map.Layers.Add(OpenStreetMap.CreateTileLayer());

                mapControl.Navigator.NavigateTo(new BoundingBox(leftBottomMapPoint.FromLonLat(),
                                                                rightTopMapPoint.FromLonLat()));

                map.Transformation = new MinimalTransformation();

                map.Limiter = new ViewportLimiter()
                {
                    PanLimits  = new BoundingBox(leftBottomMapPoint.FromLonLat(), rightTopMapPoint.FromLonLat()), //TODO
                    ZoomLimits = new MinMax(1, 12)                                                                //TODO
                };

                routeLayer = new Layer();
                map.Layers.Add(routeLayer);
                map.Widgets.Add(new ScaleBarWidget(map)
                {
                    TextAlignment       = Alignment.Center,
                    HorizontalAlignment = HorizontalAlignment.Center,
                    VerticalAlignment   = VerticalAlignment.Top
                });
            });
        }
Example #7
0
        private Map CreateMap()
        {
            var map = new Map();

            map.Layers.Add(OpenStreetMap.CreateTileLayer());

            var layer = new GenericCollectionLayer <List <IFeature> >
            {
                Style = SymbolStyles.CreatePinStyle()
            };

            map.Layers.Add(layer);

            map.Info += (s, e) =>
            {
                if (e.MapInfo?.WorldPosition == null)
                {
                    return;
                }

                // Add a point to the layer using the Info position
                layer?.Features.Add(new GeometryFeature
                {
                    Geometry = new Point(e.MapInfo.WorldPosition.X, e.MapInfo.WorldPosition.Y)
                });
                // To notify the map that a redraw is needed.
                layer?.DataHasChanged();
                return;
            };

            return(map);
        }
        private void CreateMap()
        {
            var mapControl = new MapsUIView();

            mapControl.NativeMap.Layers.Add(OpenStreetMap.CreateTileLayer());

            var layer = GenerateIconLayer();

            mapControl.NativeMap.Layers.Add(layer);
            mapControl.NativeMap.InfoLayers.Add(layer);

            mapControl.NativeMap.Info += (sender, args) =>
            {
                var layername    = args.Layer?.Name;
                var featureLabel = args.Feature?["Label"]?.ToString();
                var featureType  = args.Feature?["Type"]?.ToString();

                Debug.WriteLine("Info Event was invoked.");
                Debug.WriteLine("Layername: " + layername);
                Debug.WriteLine("Feature Label: " + featureLabel);
                Debug.WriteLine("Feature Type: " + featureType);

                Debug.WriteLine("World Postion: {0:F4} , {1:F4}", args.WorldPosition?.X, args.WorldPosition?.Y);
                Debug.WriteLine("Screen Postion: {0:F4} , {1:F4}", args.ScreenPosition?.X, args.ScreenPosition?.Y);
            };

            this.MapGrid.Children.Add(mapControl);
        }
Example #9
0
        private void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (isTracking)
            {
                Array lines = data.ToArray();
                parsed = ParseNmea(lines);

                ReceivedTextBox.Text = "";
                //foreach (KeyValuePair<string, string> entry in parsed)
                //{
                //    ReceivedTextBox.AppendText(entry.Key + ": " + entry.Value + "\n");
                //    ReceivedTextBox.ScrollToEnd();
                //}
                ReceivedTextBox.AppendText("time: " + parsed["time"]);
                ReceivedTextBox.AppendText("\nlongitude: " + parsed["lon_readable"]);
                ReceivedTextBox.AppendText("\nlatitude: " + parsed["lat_readable"]);
                ReceivedTextBox.AppendText("\nsatellites: " + parsed["sats"]);


                map = new Map();
                map.Layers.Add(OpenStreetMap.CreateTileLayer());
                var center = CalcPosition();
                var sphericalMercatorCoordinate = SphericalMercator.FromLonLat(center.X, center.Y);
                map.Home         = n => n.NavigateTo(sphericalMercatorCoordinate, map.Resolutions[9]);
                MyMapControl.Map = map;

                worker.RunWorkerAsync();
            }
        }
Example #10
0
        public MainWindow()
        {
            InitializeComponent();
            MyMapControl.Map.Layers.Add(OpenStreetMap.CreateTileLayer());
            var layer = GenerateIconLayer();

            MyMapControl.Map.Layers.Add(layer);
            MyMapControl.Map.InfoLayers.Add(layer);
            MyMapControl.Map.Info += (sender, args) =>
            {
                var layername    = args.Layer?.Name;
                var featureLabel = args.Feature?["Label"]?.ToString();
                var featureType  = args.Feature?["Type"]?.ToString();

                Debug.WriteLine("Info Event was invoked.");
                Debug.WriteLine("Layername: " + layername);
                Debug.WriteLine("Feature Label: " + featureLabel);
                Debug.WriteLine("Feature Type: " + featureType);

                Debug.WriteLine("World Postion: {0:F4} , {1:F4}", args.WorldPosition?.X, args.WorldPosition?.Y);
                Debug.WriteLine("Screen Postion: {0:F4} , {1:F4}", args.ScreenPosition?.X, args.ScreenPosition?.Y);
            };



            //var centerOfLondonOntario = new Mapsui.Geometries.Point(-6.3714, 39.4768);
            // // OSM uses spherical mercator coordinates. So transform the lon lat coordinates to spherical mercator
            // var sphericalMercatorCoordinate = SphericalMercator.FromLonLat(centerOfLondonOntario.X, centerOfLondonOntario.Y);
            // MyMapControl.Map.NavigateTo(sphericalMercatorCoordinate);
            // MyMapControl.Map.NavigateTo(MyMapControl.Map.Resolutions[9]);
        }
Example #11
0
        private void InitializeMapControl()
        {
            mapControl = view.FindViewById <MapControl>(Resource.Id.mapControl);
            mapControl.RotationLock = false;
            map     = mapControl.Map;
            map.CRS = "EPSG:3857";
            Activity.RunOnUiThread(() =>
            {
                map.Layers.Add(OpenStreetMap.CreateTileLayer());
                routeLayer = new Layer();
                map.Layers.Add(routeLayer);

                Point centerOfPolytech = new Point(30.371144, 60.003675).FromLonLat();
                map.NavigateTo(centerOfPolytech);
                map.NavigateTo(7);
                map.Transformation = new MinimalTransformation();

                map.PanLimits = new BoundingBox(leftBottom.FromLonLat(), rightTop.FromLonLat());
                map.PanMode   = PanMode.KeepCenterWithinExtents;

                map.ZoomLimits = new MinMax(1, 7);

                map.Widgets.Add(new Mapsui.Widgets.ScaleBar.ScaleBarWidget(map)
                {
                    TextAlignment = Mapsui.Widgets.Alignment.Center, HorizontalAlignment = Mapsui.Widgets.HorizontalAlignment.Center, VerticalAlignment = Mapsui.Widgets.VerticalAlignment.Top
                });
            });
        }
Example #12
0
        public static Map CreateMap()
        {
            var map = new Map();

            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            map.Layers.Add(CreateRandomPointLayer(map.Envelope));
            return(map);
        }
Example #13
0
        public static Map CreateMap()
        {
            var map = new Map();

            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            map.Layers.Add(CreateMutatingTriangleLayer(map.Envelope));
            return(map);
        }
Example #14
0
        public static Map CreateMap()
        {
            var map = new Map();

            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            map.Layers.Add(CreateLineStringLayer(CreateLineStringStyle()));
            return(map);
        }
 public static void ChangeMap(Map map)
 {
     map.Layers.Clear();
     map.Layers.Add(OpenStreetMap.CreateTileLayer());
     map.Layers.Add(CreateInfoLayer(map.Envelope, new Color(r.Next(0, 255), r.Next(0, 255), r.Next(0, 255))));
     map.InfoLayers.Add(map.Layers.First(l => l.Name == InfoLayerName));
     map.ViewChanged(true);
 }
Example #16
0
        public static Map CreateMap()
        {
            var map = new Map();

            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            map.Layers.Add(new RasterizingLayer(CreateRandomPointLayer()));
            return(map);
        }
Example #17
0
        public PrimerMapa()
        {
            InitializeComponent();

            var mapControl = new Mapsui.UI.Forms.MapControl();

            mapControl.Map.Layers.Add(OpenStreetMap.CreateTileLayer());

            mapControl.Map.Widgets.Add(new ScaleBarWidget(mapControl.Map)
            {
                TextAlignment       = Alignment.Center,
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment   = VerticalAlignment.Top
            });

            mapControl.Map.Widgets.Add(new ZoomInOutWidget()
            {
                MarginX = 20,
                MarginY = 40
            });

            var gdl = lugares.First(x => x.Nombre == "Guadalajara");

            var coordenada         = new Point(gdl.Longitud, gdl.Latitud);
            var coordenadaMercator = SphericalMercator.FromLonLat(coordenada.X, coordenada.Y);

            mapControl.Map.Home = n => n.NavigateTo(coordenadaMercator, mapControl.Map.Resolutions[9]);

            var layer = GenerateIconLayer();

            layer.IsMapInfoLayer = true;
            mapControl.Map.Layers.Add(layer);

            mapControl.Info += (sender, args) =>
            {
                var layername    = args.MapInfo.Layer?.Name;
                var featureLabel = args.MapInfo.Feature?["Label"]?.ToString();
                var featureType  = args.MapInfo.Feature?["Type"]?.ToString();

                if (!string.IsNullOrWhiteSpace(featureLabel))
                {
                    Device.BeginInvokeOnMainThread(() =>
                    {
                        ShowPopup(featureLabel, featureType);
                    });
                }

                Debug.WriteLine("Info Event was invoked.");
                Debug.WriteLine("Layername: " + layername);
                Debug.WriteLine("Feature Label: " + featureLabel);
                Debug.WriteLine("Feature Type: " + featureType);

                Debug.WriteLine("World Position: {0:F4} , {1:F4}", args.MapInfo.WorldPosition?.X, args.MapInfo.WorldPosition?.Y);
                Debug.WriteLine("Screen Position: {0:F4} , {1:F4}", args.MapInfo.ScreenPosition?.X, args.MapInfo.ScreenPosition?.Y);
            };

            ContentGrid.Children.Add(mapControl);
        }
Example #18
0
        public static Map CreateMap()
        {
            var map = new Map();

            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            map.Layers.Add(CreateLayer());
            map.Home = n => n.NavigateTo(new Point(1031709.38634765, 7507541.80851409), 10);
            return(map);
        }
Example #19
0
        public static Map CreateMap()
        {
            var map = new Map();

            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            map.Layers.Add(CreatePointLayer());
            map.Home = n => n.NavigateTo(map.Layers[1].Extent !.Centroid, map.Resolutions[5]);
            return(map);
        }
Example #20
0
        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            var sphericalMercatorCoordinate = SphericalMercator.FromLonLat(Convert.ToDouble(Longitude.Text), Convert.ToDouble(Latitude.Text));

            MyMapControl.Map.NavigateTo(sphericalMercatorCoordinate);
            MyMapControl.Map.NavigateTo(MyMapControl.Map.Resolutions[18]);
            MyMapControl.Map.Layers.Add(OpenStreetMap.CreateTileLayer());
            MyMapControl.Map.Layers.Add(Auxiliary.CreatePointLayer(sphericalMercatorCoordinate));
        }
Example #21
0
        public static Map CreateMap()
        {
            var map = new Map
            {
                CRS            = "EPSG:3857",
                Transformation = new MinimalTransformation()
            };

            map.Layers.Add(OpenStreetMap.CreateTileLayer());

            // Add many different ScaleBarWidgets to Viewport of Map
            map.Widgets.Add(new ScaleBarWidget(map)
            {
                ScaleBarMode = ScaleBarMode.Both, MarginX = 10, MarginY = 10
            });
            map.Widgets.Add(new ScaleBarWidget(map)
            {
                HorizontalAlignment = Widgets.HorizontalAlignment.Center, VerticalAlignment = Widgets.VerticalAlignment.Bottom, TextAlignment = Widgets.Alignment.Center
            });
            map.Widgets.Add(new ScaleBarWidget(map)
            {
                MaxWidth = 200, HorizontalAlignment = Widgets.HorizontalAlignment.Right, VerticalAlignment = Widgets.VerticalAlignment.Bottom, TextAlignment = Widgets.Alignment.Right, ScaleBarMode = ScaleBarMode.Both, SecondaryUnitConverter = ImperialUnitConverter.Instance
            });
            map.Widgets.Add(new ScaleBarWidget(map)
            {
                TextColor = new Color(40, 15, 95, 128), Halo = new Color(30, 4, 122, 128), HorizontalAlignment = Widgets.HorizontalAlignment.Left, VerticalAlignment = Widgets.VerticalAlignment.Center, TextAlignment = Widgets.Alignment.Right, ScaleBarMode = ScaleBarMode.Both, SecondaryUnitConverter = NauticalUnitConverter.Instance
            });
            map.Widgets.Add(new ScaleBarWidget(map)
            {
                TextColor = Color.Black, Halo = Color.Gray, HorizontalAlignment = Widgets.HorizontalAlignment.Center, VerticalAlignment = Widgets.VerticalAlignment.Center, TextAlignment = Widgets.Alignment.Center, ScaleBarMode = ScaleBarMode.Both
            });
            map.Widgets.Add(new ScaleBarWidget(map)
            {
                Font = new Font {
                    FontFamily = "serif", Size = 16
                }, TextColor = new Color(222, 88, 66, 128), Halo = new Color(252, 208, 89, 128), HorizontalAlignment = Widgets.HorizontalAlignment.Right, VerticalAlignment = Widgets.VerticalAlignment.Center, TextAlignment = Widgets.Alignment.Left, ScaleBarMode = ScaleBarMode.Both, SecondaryUnitConverter = NauticalUnitConverter.Instance
            });
            map.Widgets.Add(new ScaleBarWidget(map)
            {
                Halo = Color.Gray, HorizontalAlignment = Widgets.HorizontalAlignment.Left, VerticalAlignment = Widgets.VerticalAlignment.Top, TextAlignment = Widgets.Alignment.Left, ScaleBarMode = ScaleBarMode.Both, SecondaryUnitConverter = NauticalUnitConverter.Instance
            });
            map.Widgets.Add(new ScaleBarWidget(map)
            {
                TextColor = Color.Gray, Halo = Color.White, HorizontalAlignment = Widgets.HorizontalAlignment.Center, VerticalAlignment = Widgets.VerticalAlignment.Top, TextAlignment = Widgets.Alignment.Right, ScaleBarMode = ScaleBarMode.Both, SecondaryUnitConverter = NauticalUnitConverter.Instance
            });
            map.Widgets.Add(new ScaleBarWidget(map)
            {
                TextColor = Color.Gray, Font = null, Halo = Color.White, HorizontalAlignment = Widgets.HorizontalAlignment.Right, VerticalAlignment = Widgets.VerticalAlignment.Top, TextAlignment = Widgets.Alignment.Right
            });
            map.Widgets.Add(new ScaleBarWidget(map)
            {
                MaxWidth = 250, ShowEnvelop = true, Font = new Font {
                    FontFamily = "sans serif", Size = 24
                }, TickLength = 15, TextColor = new Color(240, 120, 24, 128), Halo = new Color(250, 168, 48, 128), HorizontalAlignment = Widgets.HorizontalAlignment.Left, VerticalAlignment = Widgets.VerticalAlignment.Top, TextAlignment = Widgets.Alignment.Left, ScaleBarMode = ScaleBarMode.Both, SecondaryUnitConverter = NauticalUnitConverter.Instance, MarginX = 100, MarginY = 100
            });
            return(map);
        }
        /// <summary>
        /// creates the openstreetmap & point layer AKA stop layer
        /// </summary>
        /// <returns></returns>
        public Mapsui.Map CreateMap()
        {
            map = new Map();
            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            map.Layers.Add(CreatePointLayer());


            return(map);
        }
        public static Map CreateMap(float pixelDensity)
        {
            var map = new Map();

            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            map.Layers.Add(new RasterizingLayer(CreateRandomPointLayer(), pixelDensity: pixelDensity));
            map.Home = n => n.NavigateTo(map.Layers[1].Envelope.Grow(map.Layers[1].Envelope.Width * 0.1));
            return(map);
        }
        public static Map CreateMap()
        {
            var map = new Map();

            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            map.Layers.Add(new AnimatedPointsWithAutoUpdateLayer {
                Name = "Animated Points"
            });
            return(map);
        }
        public MainWindow()
        {
            InitializeComponent();
            InitMapObjectButtons();
            InitAttractorButtonsTags();
            InitAttractorEditingControlsTags();

            mapControl.Map.Layers.Add(OpenStreetMap.CreateTileLayer());
            mapControl.Renderer.StyleRenderers.Add(typeof(BoundingAreaStyle), new BoundingAreaRenderer());
        }
Example #26
0
        public static Map CreateMap()
        {
            var map = new Map();

            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            map.Layers.Add(CreateStylesLayer(map.Envelope));
            map.HoverLayers.Add(map.Layers.First(l => l.Name == StylesLayerName));

            return(map);
        }
Example #27
0
        public static Map CreateMap()
        {
            var map = new Map
            {
                Limiter = new ViewportLimiterKeepWithin()
            };

            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            return(map);
        }
Example #28
0
        public static Map CreateMap()
        {
            _cancelationTokenSource?.Dispose();
            _cancelationTokenSource = new CancellationTokenSource();
            var map = new Map();

            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            map.Layers.Add(CreateMutatingTriangleLayer(map.Extent));
            return(map);
        }
Example #29
0
        public static Map CreateMap()
        {
            _atlasBitmapId = typeof(AtlasSample).LoadBitmapId("Images.osm-liberty.png");
            var map = new Map();

            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            map.Layers.Add(CreateAtlasLayer(map.Extent));

            return(map);
        }
Example #30
0
        public static Mapsui.Map CreateMap()
        {
            var map = new Mapsui.Map();

            map.Layers.Add(OpenStreetMap.CreateTileLayer());
            var b = CreateMbTilesLayer(mbpath);

            if (b != null)
            {
                map.Layers.Add(b);
            }
            var c = CreateMbTilesLayer(mbpath2);

            if (c != null)
            {
                map.Layers.Add(c);
            }

            // Get the lon lat coordinates from somewhere (Mapsui can not help you there)
            var centerOfLondonOntario = new Point(-81.2497, 42.9837);
            // OSM uses spherical mercator coordinates. So transform the lon lat coordinates to spherical mercator
            var sphericalMercatorCoordinate = SphericalMercator.FromLonLat(centerOfLondonOntario.X, centerOfLondonOntario.Y);

            // Set the center of the viewport to the coordinate. The UI will refresh automatically
            // Additionally you might want to set the resolution, this could depend on your specific purpose

            map.Layers.Add(CreatePointLayer());
            map.Layers.Add(CreateLayer());
            map.Layers.Add(CreateLineStringLayer());
            map.Layers.Add(new RasterizingLayer(CreateRandomPointLayer()));//, pixelDensity: pixelDensity));
            //map.Layers.Add(CreateMbTilesLayer());

            //mapView.Map.Layers.Add(CreateLineStringLayer());

            //mapView.Map.Viewport.Center = new Mapsui.Geometries.Point(-46.4, -23.2);
            //mapView.Rotation = false;
            // mapView.UnSnapRotationDegrees = 30;
            //mapView.ReSnapRotationDegrees = 5;

            //mapView.ev += OnPinClicked;
            //mapView.MapClicked += OnMapClicked;

            //mapView.la.UpdateMyLocation(new UI.Forms.Position());

            // mapView.Info += MapView_Info;

            //var abc = Task.Run(() => StartGPS());

            //setup(mapView);

            //Clicker = c;
            map.Home = n => n.NavigateTo(sphericalMercatorCoordinate, map.Resolutions[9]);

            return(map);
        }