supermap-leaflet
SuperMap Leaflet
Introduction
English: SuperMap Leaflet is a part of SuperMap iClient for Leaflet , and can also be used as plugins for Leaflet for working with SuperMap service types.
中文:SuperMap Leaflet 是 SuperMap iClient for Leaflet 产品的一部分,包含了部分功能 ,同时也属于Leaflet的一个插件。
-
website:http://iclient.supermap.io/introduction/leaflet.html#introduce
-
source code:https://github.com/SuperMap/iClient9/tree/master/src/leaflet
Requires Leaflet v1.0.0 or later.
Demos
Live Demo.
Example
Here is an example you can put into your own .html file.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>SuperMap Leaflet TiledMapLayer</title>
<link rel="stylesheet" href="http://cdn.bootcss.com/leaflet/1.1.0/leaflet.css">
<script type="text/javascript" src="http://cdn.bootcss.com/leaflet/1.1.0/leaflet.js"></script>
<script type="text/javascript" src="../dist/SuperMapLeaflet.js"></script>
</head>
<body style=" margin: 0;width: 100%;height:100%;position: absolute;top: 0;bottom: 0">
<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
<script type="text/javascript">
var map, url = "http://support.supermap.com.cn:8090/iserver/services/map-china400/rest/maps/China";
map = L.map('map').setView([0, 0], 1);
L.supermap.tiledMapLayer(url).addTo(map);
</script>
</body>
</html>
API Reference
We only provide tiled map module in this version.More exciting modules are coming soon.
- List of API
- TiledMapLayer
- coming soon
TiledMapLayer
Used to load and display tile layers on the map. Extends L.TileLayer.
Usage example:
L.supermap.tiledMapLayer("http://<server>:<port>/iserver/services/<serviceName>/rest/maps/<mapName>").addTo(map);
Creation
L.supermap.tiledMapLayer(url, options);
Options
The settings on the list are the request parameters for the server map resource, and they all become part of the URL.
Options inherited from TileLayer options
License
Licensed under the Apache License, Version 2.
A copy of the license is available in the repository’s LICENSE file.
