@wdp-api/gis-api
v2.2.0
Published
51WORLD gis-api is a JavaScript plugin designed for WdpApi, offering a comprehensive set of APIs that empower developers to seamlessly integrate gis-api into their applications.
Readme
Introduction
GisApi is a gis plugin for WdpApi
Install
$ npm i gisapiImport
import WdpApi from 'wdpapi'
import GisApi from 'gisapi'Init
const config = {
"id": "player", //[required] Render scene container(DOM node id)
"url": "http://172.31.19.235:8889/Renderers/Any/order", //[optional] Cloud rendering service address
"order": "b96285A3", //[optional] Rendering order, obtained on the cloud rendering client
"resolution": [3840,2160], //[optional] Set the cloud rendering output resolution[width, height]
"debugMode": "normal", //[optional] none: does not print logs, normal: normal logs
"keyboard": { //[optional] keyboard event
"normal": false, //[optional] Keyboard event, exclude F1~F12 [default disabled]
"func": false //[optional] Browser F1 ~ F12 function keys [default disabled]
}
}
const App = new WdpApi(wdpConfig);
await App.Plugin.Install(GisApi);Methods
const entityObj = new App.GeoLayer({
"geoLayerUrl": "http://cim.51aes.com/wms?layers=Shanghai:clip",
"geoLayerType": "wms", //图层类型
"geoLayerOperation": {
"tile_MaximumScreenSpaceError": 8
}
})
await App.Scene.Add(entityObj);
await entityObj.Get();
await entityObj.Delete();
## License
Copyright (c) 2023-present, 51WORLD