public ArcImsMap(ArcImsDataFrame dataFrame, int width, int height, Envelope extent) { _service = dataFrame.Service as ArcImsService; DataFrame = dataFrame; Width = width; Height = height; Extent = extent; }
public SwatchMaker(ArcImsService service, int swatchWidth, int swatchHeight) { _service = service; _map = new ArcImsMap(_service, swatchWidth, swatchHeight, new Envelope(new Coordinate(0, 0), new Coordinate(swatchWidth, swatchHeight))); _map.ImageType = CommonImageType.Png; _width = swatchWidth; _height = swatchHeight; }
public ArcImsDataFrame(ArcImsService service) { Service = service; Name = "Layers"; IsDefault = true; foreach (LayerInfo layerInfo in service.ServiceInfo.LayerInfos) { Layers.Add(new ArcImsLayer(this, layerInfo)); } CreateLayerHierarchy(); }
public ArcImsDataFrame(ArcImsService service, DataFrameInfo dataFrameInfo) { _dataFrameInfo = dataFrameInfo; Service = service; Dpi = service.ServiceInfo.Environment.Screen.Dpi; Name = dataFrameInfo.Name; IsDefault = dataFrameInfo.Default; foreach (LayerInfo layerInfo in dataFrameInfo.LayerInfos.Reverse <LayerInfo>()) { Layers.Add(new ArcImsLayer(this, layerInfo)); } CreateLayerHierarchy(); List <CommonLayer> topLayers = TopLevelLayers; Layers.Clear(); AddLayersFromHierarchy(topLayers); }
public ArcImsLayer(ArcImsDataFrame dataFrame, LayerInfo layerInfo) { _service = dataFrame.Service as ArcImsService; _layerInfo = layerInfo; DataFrame = dataFrame; DefaultVisible = layerInfo.Visible; ID = layerInfo.ID; MinimumPixelSize = ConvertIfDouble(layerInfo.MinScale, MinimumPixelSize); MaximumPixelSize = ConvertIfDouble(layerInfo.MaxScale, MaximumPixelSize); Name = layerInfo.Name; if (layerInfo.Type == LayerType.FeatureClass) { Selectable = true; switch (layerInfo.FClass.Type) { case FClassType.Line: FeatureType = OgcGeometryType.MultiLineString; break; case FClassType.Polygon: FeatureType = OgcGeometryType.MultiPolygon; break; } Fields = new List <CommonField>(); foreach (Field axlField in layerInfo.FClass.Fields) { ArcImsField field = new ArcImsField(layerInfo.FClass, axlField); Fields.Add(field); if (field.Type == CommonFieldType.ID) { FeatureIDField = field; } else if (field.Type == CommonFieldType.Geometry) { GeometryField = field; } } if (layerInfo.Toc != null) { Legend = new ArcImsLegend(layerInfo.Toc); } } else { switch (layerInfo.ArcMapType) { case ArcMapType.Group: Type = CommonLayerType.Group; break; case ArcMapType.Annotation: Type = CommonLayerType.Annotation; break; default: if (layerInfo.Type == LayerType.Image) { Type = layerInfo.Toc != null && layerInfo.Toc.Count > 0 ? CommonLayerType.Image : CommonLayerType.Annotation; } break; } } }
public TocLoader(ArcImsService service, int swatchWidth, int swatchHeight) { _service = service; _swatchMaker = new SwatchMaker(service, swatchWidth, swatchHeight); }
public TocLoader(ArcImsService service) : this(service, 16, 16) { }
public Response Send(ArcImsService service, Request request) { WebResponse webResponse = Send(service.Name, request); return(Receive(webResponse)); }
public ArcImsMap(ArcImsService service, int width, int height, Envelope extent) : this((ArcImsDataFrame)service.DefaultDataFrame, width, height, extent) { }
public static string GetSwatchName(ArcImsService service, string layerID, int valueIndex) { return(GetSwatchName(service, layerID) + "_" + valueIndex.ToString()); }
public static string GetSwatchName(ArcImsService service, string layerID) { string host = service.Host.ServerUrl.Replace("http://", "").Replace("https://", "").Replace(":", "_"); return(host + "_" + service.Name + "_" + layerID.Replace(" ", "_")); }