精品伊人久久大香线蕉,开心久久婷婷综合中文字幕,杏田冲梨,人妻无码aⅴ不卡中文字幕

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
Saving and restoring geometries in OpenLayers

To convert a vector layer or an Openlayers.Geometry object to a GeoJSON string, you should use the OpenLayers.Format.GeoJSON.write function:

var geoJSON = new OpenLayers.Format.GeoJSON(),    geoJSONText = geoJSON.write(geometryObject);

Note that you should be able to pass your object to this function, since (according to documentation) it accepts an OpenLayers.Feature.Vector as well as a OpenLayers.Geometry or an array of features.

Conversely, when you’ve got a GeoJSON string, you can convert that back to an object using the OpenLayers.Format.GeoJSON.read function:

var geometry = geoJSON.read(geoJSONText, 'Geometry');

The second parameter lets you indicate which type of object you’d like returned. Read the docs linked to for more information.

Also, take a look at this demo for a more extensive example. (View the source of the page to see how they’re doing it).

本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
OpenLayers3入門篇
Arcgis for js之WKT和GEOMETRY的相互轉(zhuǎn)換
全球地震系統(tǒng)的可視化
OpenLayers項目分析——(四)空間數(shù)據(jù)的組織與實現(xiàn)-睜眼瞎看-3sNew...
openlayers6結(jié)合geoserver實現(xiàn)地圖矢量瓦片(附源碼下載)
openlayers6結(jié)合geoserver實現(xiàn)地圖空間查詢(附源碼下載)
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服

主站蜘蛛池模板: 屏边| 白河县| 兰西县| 永宁县| 东乡族自治县| 微山县| 东明县| 浙江省| 定州市| 中西区| 武宣县| 广昌县| 宁城县| 赤峰市| 红安县| 永济市| 工布江达县| 雅安市| 五家渠市| 长海县| 渭源县| 万年县| 沧州市| 正阳县| 怀仁县| 宁明县| 莫力| 赫章县| 车致| 绩溪县| 尼木县| 阜城县| 永安市| 安龙县| 华池县| 桓仁| 东乡| 阿城市| 醴陵市| 永兴县| 邵阳县|