SuperMap iClient Classic
iClient 8C Upgrade
This chapter primarily introduces how to use SuperMap service functions based on SuperMap iClient 8C(2017) for JavaScript.
First, introduce SuperMap iClient 8C(2017) for JavaScript ( download address). For details, please refer to SuperMap iClient 8C(2017) for JavaScriptProduct Introduction
<script type="text/javascript" src="https://iclient.supermap.io/web/libs/iclient8c/libs/SuperMap.Include.js"></script>
Introduce iclient-classic.js or iclient-classic.min.js to allow SuperMap iClient 8C(2017) for JavaScript to use newest SuperMap service functions
<script type="text/javascript" src="https://iclient.supermap.io/dist/classic/iclient-classic.js"></script>
Getting Started
When you finish upgrading SuperMap iClient 8C(2017) for JavaScript, here we introduce how to get started with the development with SuperMap iClient Classic:
Introduce relevant js files
<script type="text/javascript" src="https://iclient.supermap.io/web/libs/iclient8c/libs/SuperMap.Include.js"></script>
<script type="text/javascript" src="https://mapv.baidu.com/build/mapv.js"></script>
<script type="text/javascript" src="https://iclient.supermap.io/dist/classic/iclient-classic.js"></script>
Load maps published by iServer to the map of SuperMap iClient 8C(2017) for JavaScript:
var map = new SuperMap.Map("map", {
controls: [
new SuperMap.Control.Attribution(),
new SuperMap.Control.ScaleLine(),
new SuperMap.Control.Zoom(),
new SuperMap.Control.Navigation({
dragPanOptions: {
enableKinetic: true
}
})]
});
//The process of constructing the data is omitted here
var mapvLayer = new SuperMap.Layer.MapVLayer("mapv", {dataSet: dataSet, options: options});
map.addLayer(mapvLayer);view source code »
Run Effects