Exemplo n.º 1
0
        public override string GetImageUrl()
        {
            GetImage getImage = PrepareGetImage();

            ArcXml.Image image = (ArcXml.Image)_service.Send(getImage);

            string url = image.Output.Url;

            if (_accessImageFromHost)
            {
                UriBuilder hostBuilder = new UriBuilder(_service.Host.ServerUrl);
                UriBuilder urlBuilder  = new UriBuilder(url);
                urlBuilder.Host = hostBuilder.Host;
                url             = urlBuilder.ToString();
            }

            return(url);
        }
Exemplo n.º 2
0
        public override int GetFeatureCount(string where, IGeometry shape)
        {
            CheckIsFeatureLayer();

            SpatialQuery query = new SpatialQuery(where);

            query.Subfields = "#ID#";

            GetFeatures getFeatures = new GetFeatures(ID, query);

            getFeatures.Attributes = false;
            getFeatures.Geometry   = false;
            getFeatures.DataFrame  = DataFrame.Name;

            if (shape != null)
            {
                query.SpatialFilter = new SpatialFilter(shape);
            }

            Features features = (Features)_service.Send(getFeatures);

            return(features.FeatureCount.Count);
        }