${iServerJava6R_GetFeaturesByGeometryService_Title}

${iServerJava6R_GetFeaturesByGeometryService_Description}

상속: SuperMap.Web.Service.ServiceBase
 //对目标地物进行查询
 private void queryFeature(SuperMap.Web.Core.Geometry geo)
 {
     GetFeaturesByGeometryParameters param = new GetFeaturesByGeometryParameters
     {
         DatasetNames = new string[] { "Jingjin:Landuse_R" },
         SpatialQueryMode = SpatialQueryMode.INTERSECT,
         Geometry = geo,
     };
     GetFeaturesByGeometryService query = new GetFeaturesByGeometryService(url1);
     query.ProcessAsync(param);
     query.ProcessCompleted += new EventHandler<GetFeaturesEventArgs>(query_ProcessCompleted);
     query.Failed += new EventHandler<ServiceFailedEventArgs>(query_Failed);
 }
        void DrawCompleted(object sender , DrawEventArgs e)
        {
            if (e.Geometry == null)
            {
                return;
            }

            GetFeaturesByGeometryParameters param = new GetFeaturesByGeometryParameters
            {
                DatasetNames = new List<string> { "World:Countries" } ,
                SpatialQueryMode = SuperMap.Web.iServerJava6R.SpatialQueryMode.INTERSECT ,
                Geometry = e.Geometry
            };

            GetFeaturesByGeometryService service = new GetFeaturesByGeometryService(url);
            service.ProcessCompleted += new EventHandler<GetFeaturesEventArgs>(service_ProcessCompleted);
            service.ProcessAsync(param);
        }
        private void QueryFeatures_Click(object sender, RoutedEventArgs e)
        {
            //GetFeaturesByIDsParameters param = new GetFeaturesByIDsParameters
            //{
            //    DatasetNames = new string[] { "World:Capital", "World:World" },
            //    IDs = new int[] { 2, 3, 5 },
            //    Fields = new string[] { "SmID" },
            //    FromIndex = 1,
            //    ToIndex = 10
            //};

            //GetFeaturesByIDsService queryFeaturesService = new GetFeaturesByIDsService(dataqueryurl);
            //queryFeaturesService.ProcessAsync(param);
            //queryFeaturesService.Failed += this.Failed;
            //queryFeaturesService.ProcessCompleted += new EventHandler<GetFeaturesEventArgs>(queryFeaturesService_ProcessCompleted);

            GetFeaturesByGeometryParameters geoParam = new GetFeaturesByGeometryParameters
            {
                Geometry = new GeoPoint(42, 21.5),
                DatasetNames = new string[] { "World:Capital", "World:World" },
                SpatialQueryMode = SpatialQueryMode.DISJOINT,
                FromIndex = 0,
                ToIndex = 10
            };
            GetFeaturesByGeometryService queryFeaturesService = new GetFeaturesByGeometryService(dataqueryurl);
            queryFeaturesService.ProcessAsync(geoParam);
            queryFeaturesService.Failed += this.Failed;
            queryFeaturesService.ProcessCompleted += new EventHandler<GetFeaturesEventArgs>(queryFeaturesService_ProcessCompleted);

            //GetFeaturesBySQLParameters sqlParam = new GetFeaturesBySQLParameters
            //{
            //    DatasetNames = new string[] { "World:Capital", "World:World" },
            //    FilterParameter = new FilterParameter
            //    {
            //        Name = "World@World",
            //        AttributeFilter = "SmID=42",
            //        Fields = new string[] { "SmID" },
            //    }
            //};
            //GetFeaturesBySQLService queryFeaturesService = new GetFeaturesBySQLService(dataqueryurl);
            //queryFeaturesService.ProcessAsync(sqlParam);
            //queryFeaturesService.Failed += this.Failed;
            //queryFeaturesService.ProcessCompleted += new EventHandler<GetFeaturesEventArgs>(queryFeaturesService_ProcessCompleted);

            //GetFeaturesByBufferParameters bufferParam = new GetFeaturesByBufferParameters
            //{
            //    DatasetNames = new string[] { "World:Capital", "World:World" },
            //    Geometry = new GeoPoint(42, 21.5),
            //    BufferDistance = 10,
            //    //AttributeFilter = "SmID<10"
            //};
            //GetFeaturesByBufferService queryFeaturesService = new GetFeaturesByBufferService(dataqueryurl);
            //queryFeaturesService.ProcessAsync(bufferParam);
            //queryFeaturesService.Failed += this.Failed;
            //queryFeaturesService.ProcessCompleted += new EventHandler<GetFeaturesEventArgs>(queryFeaturesService_ProcessCompleted);
        }