arcgis這個坑

var geometryService = new esri.tasks.GeometryService(getConfig('GeometryServerUrl'));
GeometryServerUrl : ' http://192.168.2.21:6080/arcgis/rest/services/Utilities/Geometry/GeometryServer',
var geometryService = me.getGeometryService();
var params = new esri.tasks.ProjectParameters();
params.geometries = [point];
params.outSR = new esri.SpatialReference({wkid:getConfig('wkid')});
geometryService.project (params,function(_event){
var geoPoint = _event[0];
//設置區域參數
var bufferParameters = new esri.tasks.BufferParameters();
     bufferParameters.outSpatialReference = map.spatialReference;//
     bufferParameters.geometries = [geoPoint];
     bufferParameters.distances = [ distance ]; // [ 2000, 4000 ];
     bufferParameters.unit = geometryService.UNIT_METER;
     geometryService.buffer(bufferParameters,function(geo){
     map.setExtent(geo[0].getExtent());
     });
});
相關文章
相關標籤/搜索