使用GeometryService进行buffer总是报错‘init.js:192 Error: Unable to complete operation.(…)’
来源:互联网 发布:神户制钢 知乎 编辑:程序博客网 时间:2024/06/09 07:08
如题,使用GeometryService进行buffer,控制台总是报错,不能正确的buffer,看不出具体的错误内容。
‘init.js:192 Error: Unable to complete operation.(…)’
问题出现在BufferParameters的设置参数上。
<span style="font-size:18px;">var params = new BufferParameters(); params.geometries = [geometry]; params.distances = [distance]; params.bufferSpatialReference = that.map.spatialReference; params.outSpatialReference = that.map.spatialReference; params.unit = GeometryService['UNIT_METER'];</span>
看起来参数设置是没有问题的。但是,说明文档没有说清楚,害我找了4个小时的错误。
1、bufferSpatialReference这个参数必须使用投影坐标系。
这个参数是执行缓冲区的要素的坐标参考,如果使用投影坐标系就会报错。说明文档中只是说这个是设置空间参考的。
原代码改为:
<span style="font-size:18px;">params.bufferSpatialReference = <span style="font-size: 18px;">new SpatialReference({ wkid: 102100});</span></span>
2、outSpatialReference这个参数可以是地理坐标系或投影坐标系。
这两个参数如果没有设置,会默认与另一个参数相一致,如果两个参数都没有设置,则与geometry的空间参考一致。
0 0
- 使用GeometryService进行buffer总是报错‘init.js:192 Error: Unable to complete operation.(…)’
- 使用 arcgis for javascript GeometryService进行缓冲区分析 错误 Unable to complete operation.(…)
- ArcGIS REST Server 报错Unable to complete operation. error: Some parameters could not be recognized.
- npm总是报错:unable to verify the first certificate
- 使用pip更新whl 报错Fatal error in launcher: Unable to create process using '"'
- python pip使用报错:Fatal error in launcher: Unable to create process using '"'
- 打补丁报错Opatch error : "Unable to lock Central Inventory
- Fatal error: Unable to read 1403 bytes in 报错
- ERROR: Unable to create the home directory: Operation not applicable
- gf-complete报错error: incompatible types when assigning to type '__m128i' from type 'int'
- jsp报Syntax error, insert "}" to complete MethodBody错误
- 关于java使用min js包总是报错解决方案
- Eclipse总是提示The user operation is waiting for background work to complete的解决方法(ubuntu环境下)
- linux无法进入系统,报错Unable to load SELinux Policy,Kernel panic - not syncing:Attempted to kill init
- impdp或expdp报错ORA-39002: invalid operation,ORA-39070: Unable to open the log file
- Server error! The server encountered an internal error and was unable to complete your request. Ei
- myeclipse报错:Unable to create this part due to an internal error.
- cocoapods 0.35.0 版本 报错 Parsing unable to continue due to parsing error:
- iOS中自定义界面统计(统计一定时间内访问次数,以及停留时间)
- Linux的inode的理解
- 【hibernate】一对多(客户与订单双向关联)遇到的异常
- UIView的layoutSubviews和drawRect方法何时调用
- DebugView——经典调试输出工具
- 使用GeometryService进行buffer总是报错‘init.js:192 Error: Unable to complete operation.(…)’
- 当前最全的TAdvStringGrid控件属性事件介绍和使用方法(AdvStringGrid使用技巧/Cells)
- 导入JS文件报错
- 50行代码实现图文混排
- 串算法 - 蛮力匹配 Brute Force
- web前端开发工程师面试题大全
- lucene 范围查询及其原理
- hdu 1258 Sum It Up
- 网页基本布局