예제 #1
0
        /// <summary>
        /// Create ArcGisDynamicProvider based on a given capabilities file
        /// </summary>
        /// <param name="url">url to map service example: http://url/arcgis/rest/services/test/MapServer</param>
        /// <param name="arcGisDynamicCapabilities"></param>
        /// <param name="token">token to request service</param>
        public ArcGISDynamicProvider(string url, ArcGISDynamicCapabilities arcGisDynamicCapabilities, string?token = null)
        {
            _timeOut = 10000;
            Token    = token;

            Url = url;
            ArcGisDynamicCapabilities = arcGisDynamicCapabilities;
        }
예제 #2
0
        /// <summary>
        /// Create ArcGisDynamicProvider, capabilities will be parsed automatically
        /// </summary>
        /// <param name="url">url to map service example: http://url/arcgis/rest/services/test/MapServer</param>
        /// <param name="token">token to request service</param>
        public ArcGISDynamicProvider(string url, string?token = null)
        {
            _timeOut = 10000;
            Token    = token;
            Url      = url;

            ArcGisDynamicCapabilities = new ArcGISDynamicCapabilities
            {
                fullExtent = new Extent {
                    xmin = 0, xmax = 0, ymin = 0, ymax = 0
                },
                initialExtent = new Extent {
                    xmin = 0, xmax = 0, ymin = 0, ymax = 0
                }
            };

            var capabilitiesHelper = new CapabilitiesHelper();

            capabilitiesHelper.CapabilitiesReceived += CapabilitiesHelperCapabilitiesReceived;
            capabilitiesHelper.CapabilitiesFailed   += CapabilitiesHelperCapabilitiesFailed;
            capabilitiesHelper.GetCapabilities(url, CapabilitiesType.DynamicServiceCapabilities, token);
        }