Ejemplo n.º 1
0
        public override async void MapViewTapped(MapView mapView, MapViewInputEventArgs e, bool drawing)
        {
            if (drawing)
            {
                DeleteGraphic(DRAFT);
            }

            ClearHilight();

            var graphic = await GraphicsLayer.HitTestAsync(mapView, e.Position);

            if (graphic != null)
            {
                if (_layerInfo.MarkerType == EventMarkerType.Proportional)
                {
                    (graphic.Symbol as SimpleMarkerSymbol).Color = DefaultSettings.GetColor(GeoStatus.Hilight);
                }
                else
                {
                    graphic.Symbol = _layerInfo.GetSymbol(GeoStatus.Hilight);
                }

                OnPointTapped(graphic.Geometry as MapPoint);
            }
            else
            {
                if (drawing)
                {
                    AddGraphic(e.Location, DRAFT, 1, GeoStatus.Hilight);
                }

                OnPointTapped((MapPoint)GeometryEngine.Project(e.Location, SpatialReferences.Wgs84));
            }
        }
Ejemplo n.º 2
0
 public override void ClearHilight()
 {
     if (_layerInfo.MarkerType == EventMarkerType.Proportional)
     {
         GraphicsLayer.Graphics.ToList().ForEach(g => (g.Symbol as SimpleMarkerSymbol).Color = DefaultSettings.GetColor(GeoStatus.Normal));
     }
     else
     {
         GraphicsLayer.Graphics.ToList().ForEach(g => g.Symbol = _layerInfo.GetSymbol(GeoStatus.Normal));
     }
 }