SuperMap iClient for OpenLayers

产品介绍

SuperMap iClient for OpenLayers 是一套基于OpenLayers的云GIS网络客户端开发平台, 支持访问SuperMap iServer / iExpress / iPortal / iManager / Online的地图、服务和资源,为用户提供了完整专业的GIS能力, 同时提供了优秀的可视化功能。

GitHub托管地址:https://github.com/SuperMap/iClient9/tree/master/src/openlayers

OSChina托管地址:https://gitee.com/isupermap/iClient9/tree/master/src/openlayers

开发指南

快速入门

本章节主要介绍SuperMap iClient for OpenLayers的入门用法,详细的接口参数请参考API页面。

引入 ol.js 或 ol-debug.js,OpenLayers此处引入的BootCDN的托管地址:

<script type="text/javascript" src="https://cdn.bootcss.com/openlayers/4.2.0/ol.js"></script>

引入 iclient9-openlayers.js 或 iclient9-openlayers.min.js:

<script type="text/javascript" src="https://iclient.supermap.io/dist/iclient9-openlayers.js"></script>

将 iServer 发布的地图加载至 OpenLayers 的 map 中:

var map = new ol.Map({
    target: 'map',
    layers: [new ol.layer.Tile({
            source: new ol.source.TileSuperMapRest({
                    url: "http://localhost:8090/iserver/services/map/rest/maps/World"
            }),
     })]
});查看源码 »

运行效果

模块说明

相关依赖