SuperMap iClient for MapboxGL
产品介绍
SuperMap iClient for MapboxGL 是一套基于MapboxGL的云GIS网络客户端开发平台, 支持访问SuperMap iServer / iExpress / iPortal / iManager / Online的地图、服务和资源,为用户提供了完整专业的GIS能力, 同时提供了优秀的可视化功能。
GitHub托管地址:https://github.com/SuperMap/iClient9/tree/master/src/mapboxgl
OSChina托管地址:https://gitee.com/isupermap/iClient9/tree/master/src/mapboxgl
开发指南
快速入门
本章节主要介绍SuperMap iClient for MapboxGL的入门用法,接口的详细参数请参考API页面。
引入 mapbox-gl.js 或 mapbox-gl-dev.js,MapBoxGL此处引入的BootCDN的托管地址:
<script type="text/javascript" src="https://cdn.bootcss.com/mapbox-gl/0.39.1/mapbox-gl.js"></script>
引入 iclient9-mapboxgl.js 或 iclient9-mapboxgl.min.js:
<script type="text/javascript" src="https://iclient.supermap.io/dist/iclient9-mapboxgl.js"></script>
将 iServer 发布的地图加载至 MapboxGL 的 map 中:
var map = new mapboxgl.Map(
{
container: "map",
style: {
"sources": {
"raster-tiles": {
"type": "raster",
"tiles": [
'http://localhost:8090/iserver/services/map/rest/maps/China/zxyTileImage.png?z={z}&x={x}&y={y}'
],
}
},
"layers": [{
"id": "simple-tiles",
"type": "raster",
"source": "raster-tiles",
}]
},
});查看源码 »
运行效果
模块说明
许可说明
Apache License 2.0