2016-04-02 22:13:56 +08:00
|
|
|
---
|
|
|
|
layout: tutorial_frame
|
|
|
|
title: WMS example
|
|
|
|
---
|
|
|
|
<script type='text/javascript'>
|
|
|
|
|
|
|
|
var map = L.map('map', {
|
|
|
|
center: [-17, -67],
|
|
|
|
zoom: 3
|
|
|
|
});
|
|
|
|
|
2017-08-14 17:29:53 +08:00
|
|
|
var tms_ne = L.tileLayer('https://demo.boundlessgeo.com/geoserver/gwc/service/tms/1.0.0/ne:ne@EPSG:900913@png/{z}/{x}/{y}.png', {
|
2016-04-02 22:13:56 +08:00
|
|
|
tms: true
|
|
|
|
}).addTo(map);
|
|
|
|
|
2017-08-14 17:29:53 +08:00
|
|
|
var tms_bluemarble = L.tileLayer('https://demo.boundlessgeo.com/geoserver/gwc/service/tms/1.0.0/nasa:bluemarble@EPSG:900913@jpg/{z}/{x}/{y}.jpg', {
|
2016-04-02 22:13:56 +08:00
|
|
|
tms: true
|
|
|
|
});
|
|
|
|
|
|
|
|
var basemaps = {
|
|
|
|
'Natural Earth': tms_ne,
|
|
|
|
'NASA Blue Marble': tms_bluemarble
|
|
|
|
};
|
|
|
|
|
|
|
|
L.control.layers(basemaps, {}, {collapsed: false}).addTo(map);
|
|
|
|
|
|
|
|
basemaps.Countries.addTo(map);
|
|
|
|
|
|
|
|
</script>
|