首页 / 浏览问题 / 云GIS / 问题详情
JavaScript坐标变成geometry
1EXP 2018年03月08日
function drawCompleted(drawGeometryArgs) {
                var feature = new SuperMap.Feature.Vector();
                feature.geometry = drawGeometryArgs.feature.geometry,
                        feature.style = style;
                vectorLayer.addFeatures(feature);

                var queryParam, queryByGeometryParameters, queryService;
                queryParam = new SuperMap.REST.FilterParameter({name: "Capitals@World.1"});
                queryByGeometryParameters = new SuperMap.REST.QueryByGeometryParameters({
                    queryParams: [queryParam],
                    geometry: drawGeometryArgs.feature.geometry,
                    spatialQueryMode: SuperMap.REST.SpatialQueryMode.INTERSECT
                });
                queryService = new SuperMap.REST.QueryByGeometryService(url, {
                    eventListeners: {
                        "processCompleted": processCompleted,
                        "processFailed": processFailed
                    }
                });
                queryService.processAsync(queryByGeometryParameters);
            }

1个回答

您好,请问您的问题是什么?
4,524EXP 2018年03月08日
function pointGrid(){

                    var pointGeometry = new SuperMap.Geometry.Point(11870527.503512,3447749.2426692);

                    var queryParam, queryByGeometryParameters, queryService;

                    queryParam = new SuperMap.REST.FilterParameter({name: "grid@map"});
                    queryByGeometryParameters = new SuperMap.REST.QueryByGeometryParameters({
                    queryParams: [queryParam],
                    geometry: pointGeometry,
                    spatialQueryMode: SuperMap.REST.SpatialQueryMode.INTERSECT

                   });

                    queryService = new SuperMap.REST.QueryByGeometryService(url2, {
                    eventListeners: {
                        "processCompleted": processCompleted,
                        "processFailed": processFailed
                    }
                });

                queryService.processAsync(queryByGeometryParameters);

               
        
        
        }这样就可以了  ,搞定了。
...