public MapLayerInfoStruct LoadLayerInfos(MapObjects2.MapLayer layer, string fileName, double minScale, double maxScale) { MapLayerInfoStruct oMapLayerStruct = new MapLayerInfoStruct(); oMapLayerStruct.Name = layer.Name; oMapLayerStruct.FileName = fileName; oMapLayerStruct.ShapeType = (short)layer.shapeType; oMapLayerStruct.MinLevel = minScale; oMapLayerStruct.MaxLevel = maxScale; this.DeconvertSymbol(layer.Symbol, oMapLayerStruct.Symbol); oMapLayerStruct.Render = this.ExportLayerRender(layer); return(oMapLayerStruct); }
public MapStruct SaveMapInfosToProject(AxMapObjects2.AxMap mapControl, string geoDataSetPath) { MapStruct oMapStruct = new MapStruct(); oMapStruct.BBox.MinX = mapControl.Extent.Top; oMapStruct.BBox.MinY = mapControl.Extent.Left; oMapStruct.BBox.MaxX = mapControl.Extent.Bottom; oMapStruct.BBox.MaxY = mapControl.Extent.Right; oMapStruct.BBox.Width = mapControl.Extent.Width; oMapStruct.BBox.Height = mapControl.Extent.Height; oMapStruct.CoordinateSystem = mapControl.CoordinateSystem; oMapStruct.GeoDataSetPath = geoDataSetPath; short iLayersCount = mapControl.Layers.Count; for (short i = 0; i < iLayersCount; i++) { object oLayer = mapControl.Layers.Item(i); if (oLayer is MapObjects2.MapLayer) { MapObjects2.MapLayer oMapLayer = oLayer as MapObjects2.MapLayer; MapLayerInfoStruct oMapLayerStruct = new MapLayerInfoStruct(); oMapLayerStruct.LayerType = (short)oMapLayer.LayerType; oMapLayerStruct.Name = oMapLayer.Name; oMapLayerStruct.ShapeType = (short)oMapLayer.shapeType; oMapLayerStruct.Render = this.ExportLayerRender(oMapLayer); this.DeconvertSymbol(oMapLayer.Symbol, oMapLayerStruct.Symbol); } else if (oLayer is MapObjects2.ImageLayer) { throw new NotImplementedException(); } } return(oMapStruct); }
public MapStruct SaveMapInfosToProject(AxMapObjects2.AxMap mapControl,string geoDataSetPath) { MapStruct oMapStruct = new MapStruct(); oMapStruct.BBox.MinX = mapControl.Extent.Top; oMapStruct.BBox.MinY = mapControl.Extent.Left; oMapStruct.BBox.MaxX = mapControl.Extent.Bottom; oMapStruct.BBox.MaxY = mapControl.Extent.Right; oMapStruct.BBox.Width = mapControl.Extent.Width; oMapStruct.BBox.Height = mapControl.Extent.Height; oMapStruct.CoordinateSystem = mapControl.CoordinateSystem; oMapStruct.GeoDataSetPath = geoDataSetPath; short iLayersCount = mapControl.Layers.Count; for (short i = 0; i < iLayersCount; i++) { object oLayer = mapControl.Layers.Item(i); if (oLayer is MapObjects2.MapLayer) { MapObjects2.MapLayer oMapLayer = oLayer as MapObjects2.MapLayer; MapLayerInfoStruct oMapLayerStruct = new MapLayerInfoStruct(); oMapLayerStruct.LayerType = (short)oMapLayer.LayerType; oMapLayerStruct.Name = oMapLayer.Name; oMapLayerStruct.ShapeType = (short)oMapLayer.shapeType; oMapLayerStruct.Render = this.ExportLayerRender(oMapLayer); this.DeconvertSymbol(oMapLayer.Symbol, oMapLayerStruct.Symbol); } else if (oLayer is MapObjects2.ImageLayer) { throw new NotImplementedException(); } } return oMapStruct; }
public MapLayerInfoStruct LoadLayerInfos(MapObjects2.MapLayer layer,string fileName,double minScale,double maxScale) { MapLayerInfoStruct oMapLayerStruct = new MapLayerInfoStruct(); oMapLayerStruct.Name = layer.Name; oMapLayerStruct.FileName = fileName; oMapLayerStruct.ShapeType = (short)layer.shapeType; oMapLayerStruct.MinLevel = minScale; oMapLayerStruct.MaxLevel = maxScale; this.DeconvertSymbol(layer.Symbol, oMapLayerStruct.Symbol); oMapLayerStruct.Render = this.ExportLayerRender(layer); return oMapLayerStruct; }