refs #22 support of normal and overlay WMS tile servers in tileservers.php
parent
0698a7faf2
commit
17effd1d77
|
@ -9,6 +9,17 @@ $baseTileServers = [
|
|||
// 'minzoom' => '',
|
||||
// 'maxzoom' => ''
|
||||
//),
|
||||
//Array(
|
||||
// 'name' => 'tilewms',
|
||||
// 'type' => 'tilewms|overlaywms',
|
||||
// 'url' => '',
|
||||
// 'layers' => '',
|
||||
// 'version' => '',
|
||||
// 'attribution' => '',
|
||||
// 'format' => '',
|
||||
// 'opacity' => '0-1',
|
||||
// 'transparent' => 'true|false'
|
||||
//),
|
||||
Array(
|
||||
'name' => 'OpenStreetMap',
|
||||
'type' => 'tile',
|
||||
|
|
|
@ -209,6 +209,17 @@
|
|||
var sattrib = $(this).attr('attribution');
|
||||
baseLayers[sname] = new L.TileLayer(surl, {minZoom: minz, maxZoom: maxz, attribution: sattrib});
|
||||
});
|
||||
$('#basetileservers li[type=tilewms]').each(function() {
|
||||
var sname = $(this).attr('name');
|
||||
var surl = $(this).attr('url');
|
||||
var slayers = $(this).attr('layers') || '';
|
||||
var sversion = $(this).attr('version') || '1.1.1';
|
||||
var stransparent = ($(this).attr('transparent') === 'true');
|
||||
var sformat = $(this).attr('format') || 'image/png';
|
||||
var sopacity = $(this).attr('opacity') || 1;
|
||||
var sattrib = $(this).attr('attribution') || '';
|
||||
baseLayers[sname] = new L.tileLayer.wms(surl, {layers: slayers, version: sversion, transparent: stransparent, opacity: sopacity, format: sformat, attribution: sattrib});
|
||||
});
|
||||
// add custom layers
|
||||
$('#tileserverlist li').each(function() {
|
||||
var sname = $(this).attr('name');
|
||||
|
@ -229,6 +240,17 @@
|
|||
var sattrib = $(this).attr('attribution');
|
||||
baseOverlays[sname] = new L.TileLayer(surl, {minZoom: minz, maxZoom: maxz, attribution: sattrib});
|
||||
});
|
||||
$('#basetileservers li[type=overlaywms]').each(function() {
|
||||
var sname = $(this).attr('name');
|
||||
var surl = $(this).attr('url');
|
||||
var slayers = $(this).attr('layers') || '';
|
||||
var sversion = $(this).attr('version') || '1.1.1';
|
||||
var stransparent = ($(this).attr('transparent') === 'true');
|
||||
var sformat = $(this).attr('format') || 'image/png';
|
||||
var sopacity = $(this).attr('opacity') || 1;
|
||||
var sattrib = $(this).attr('attribution') || '';
|
||||
baseOverlays[sname] = new L.tileLayer.wms(surl, {layers: slayers, version: sversion, transparent: stransparent, opacity: sopacity, format: sformat, attribution: sattrib});
|
||||
});
|
||||
// add custom overlays
|
||||
$('#overlayserverlist li').each(function() {
|
||||
var sname = $(this).attr('name');
|
||||
|
|
|
@ -87,6 +87,16 @@ foreach($_['basetileservers'] as $ts){
|
|||
p($ts['type']);
|
||||
echo '" url="';
|
||||
p($ts['url']);
|
||||
echo '" layers="';
|
||||
p($ts['layers']);
|
||||
echo '" version="';
|
||||
p($ts['version']);
|
||||
echo '" format="';
|
||||
p($ts['format']);
|
||||
echo '" opacity="';
|
||||
p($ts['opacity']);
|
||||
echo '" transparent="';
|
||||
p($ts['transparent']);
|
||||
echo '" minzoom="';
|
||||
p($ts['minzoom']);
|
||||
echo '" maxzoom="';
|
||||
|
|
Loading…
Reference in New Issue