public void AddFeatureLayer(FeatureLayerContext layerContext) { if (_mapView == null) { _pendingLayerDrawActions.Add(() => CreateFeatureLayerCore(layerContext)); } else { CreateFeatureLayerCore(layerContext); } }
public void AddFeatureLayer(FeatureLayerContext layerContext) { if (_mapView == null) { _pendingLayerDrawActions.Add(() => CreateFeatureLayerCore(layerContext)); } else { CreateFeatureLayerCore(layerContext); } }
public ILayerViewModel CreateOverlay(FeatureLayerContext layerContext, MapView mapView, AssetManager assetManager, AnnotationView annotationView = null) { if (layerContext.StyleType == StyleType.Point) { var overlay = CreatePointOverlay((PointStyleInfo)layerContext.StyleInfo, assetManager, annotationView); return(new PointFeatureLayerViewModel(layerContext.Name, layerContext.Alias, overlay, layerContext.GeoDataManager)); } //if (layerContext.StyleType == StyleType.Point) //{ // var style = MapquestStyleFactory.CreatePointStyle((PointStyleInfo)layerContext.StyleInfo, assetManager); // return CreateFeatureLayerViewModel(style, assetManager, annotationView, layerContext); //} //if (layerContext.StyleType == StyleType.Line) //{ // var lineOverlay = CreateLineOverlay((LineStyleInfo) layerContext.StyleInfo); // return new LineFeatureLayerViewModel(layerContext.Name, layerContext.Alias, lineOverlay, layerContext.GeoDataManager); //} if (layerContext.StyleType == StyleType.Line) { var lineStyle = MapquestStyleFactory.CreateLineStyle((LineStyleInfo)layerContext.StyleInfo); return(CreateFeatureLayerViewModel(lineStyle, assetManager, annotationView, layerContext)); } if (layerContext.StyleType == StyleType.Polygon) { var overlay = CreatePolygonOverlay((PolygonStyleInfo)layerContext.StyleInfo); return(new PolygonFeatureLayerViewModel(layerContext.Name, layerContext.Alias, overlay, layerContext.GeoDataManager)); } throw new NotSupportedException(string.Format("layer content style {0} not supported.", layerContext.StyleType)); }
private void CreateFeatureLayerCore(FeatureLayerContext layerContext) { var layer = _mapQuestOverlayFactory.CreateOverlay(layerContext, _map, _assetManager, _annotationView); RegisterLayerViewModel(layer); }
private void CreateFeatureLayerCore(FeatureLayerContext layerContext) { var layer = _mapQuestOverlayFactory.CreateOverlay(layerContext, _map, _assetManager, _annotationView); RegisterLayerViewModel(layer); }
public FeatureLayerViewModel CreateFeatureLayerViewModel(Style style, AssetManager assetManager, AnnotationView annotationView, FeatureLayerContext layerContext) { var overlay = CreateVectorOverlay(style, assetManager, annotationView); return(new FeatureLayerViewModel(layerContext.Name, layerContext.Alias, overlay, layerContext.GeoDataManager)); }