【发布时间】:2016-03-31 14:07:05
【问题描述】:
我的 SQL 数据库中有一些 SqlGeometries 代表点并包含 Z 坐标。
一旦我使用ol.format.WKT().readFeature('POINT (1 2 3)', { ... }),我就会收到以下错误:
Error: Unexpected `445.332` at position 29 in `POINT (600000.631 200000.848 445.332)`
at ol.format.WKT.Parser.prototype.parsePointText_ (http://localhost:33464/app/lib/openLayers/ol-debug.js:94728:3)
at ol.format.WKT.Parser.prototype.parseGeometry_ (http://localhost:33464/app/lib/openLayers/ol-debug.js:94687:7)
at ol.format.WKT.Parser.prototype.parse (http://localhost:33464/app/lib/openLayers/ol-debug.js:94663:3)
at ol.format.WKT.prototype.parse_ (http://localhost:33464/app/lib/openLayers/ol-debug.js:94287:3)
at ol.format.WKT.prototype.readGeometryFromText (http://localhost:33464/app/lib/openLayers/ol-debug.js:94368:3)
at ol.format.WKT.prototype.readFeatureFromText (http://localhost:33464/app/lib/openLayers/ol-debug.js:94307:3)
at ol.format.TextFeature.prototype.readFeature (http://localhost:33464/app/lib/openLayers/ol-debug.js:84053:3)
现在我不介意 OpenLayers 无法处理 3D 坐标,但我可以告诉它忽略第三个值而不是引发错误吗?
【问题讨论】:
标签: openlayers-3