Skip to content

Commit 2f520ab

Browse files
committed
Update Tile preview and add tile stamen toner
1 parent cb618a9 commit 2f520ab

19 files changed

Lines changed: 11 additions & 9 deletions

admin/admin_config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
'mapquest' => 'MapQuestOpen',
4646
'mapquestaerial'=> 'MapQuestOpen Aerial',
4747
'cloudmade' => 'Cloudmade',
48+
'toner' => 'Stamen Toner',
4849
'custom' => 'Own tile (custom style)',
4950
);
5051

admin/admin_config.tpl

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,9 @@ Refer to the <a href="https://github.com/xbgmsharp/piwigo-openstreetmap/wiki" ta
304304
function tile_toggle()
305305
{
306306
var div = document.getElementById("custom-tile-toggle");
307-
var select = document.getElementById("osm_baselayer");
307+
var select = document.getElementById("osm_baselayer").value;
308308
//alert(select.selectedIndex);
309-
if (select.selectedIndex == 8) // If custom
309+
if (select == "custom") // If custom
310310
{
311311
div.removeAttribute("style");
312312
} else {
@@ -333,14 +333,15 @@ function tile_preview()
333333
{
334334
var select = document.getElementById("osm_baselayer");
335335
baselayer = new Array(
336-
'https://c.tile.openstreetmap.org/5/15/11.png',
337-
'http://c.www.toolserver.org/tiles/bw-mapnik/5/15/11.png',
338-
'https://c.tile.openstreetmap.fr/hot/5/15/11.png',
339-
'https://c.tile.openstreetmap.de/tiles/osmde/5/15/11.png',
340-
'https://c.tile.openstreetmap.fr/hot/5/15/11.png',
341-
'https://otile1.mqcdn.com/tiles/1.0.0/osm/5/15/11.png',
342-
'https://oatile1.mqcdn.com/tiles/1.0.0/sat/5/15/11.png',
336+
'{/literal}{$OSM_PATH}{literal}leaflet/icons/preview_openstreetmap_mapnik.png',
337+
'{/literal}{$OSM_PATH}{literal}leaflet/icons/preview_openstreetmap_blackandwhite.png',
338+
'{/literal}{$OSM_PATH}{literal}leaflet/icons/preview_openstreetmap_fr.png',
339+
'{/literal}{$OSM_PATH}{literal}leaflet/icons/preview_openstreetmap_de.png',
340+
'{/literal}{$OSM_PATH}{literal}leaflet/icons/preview_openstreetmap_fr.png',
341+
'{/literal}{$OSM_PATH}{literal}leaflet/icons/preview_mapquest.png',
342+
'{/literal}{$OSM_PATH}{literal}leaflet/icons/preview_mapquest_aerial.png',
343343
'https://a.tile.cloudmade.com/7807cc60c1354628aab5156cfc1d4b3b/997/256/5/15/11.png',
344+
'{/literal}{$OSM_PATH}{literal}leaflet/icons/preview_toner.png',
344345
'NULL'
345346
);
346347
//alert(baselayer[select.selectedIndex]);

leaflet/icons/cartodb_positron.png

5.25 KB
Loading
14.2 KB
Loading
11.6 KB
Loading

leaflet/icons/here_normalday.png

5.7 KB
Loading
5.05 KB
Loading
7.94 KB
Loading
3.78 KB
Loading

leaflet/icons/openstreetmap_de.png

4.22 KB
Loading

0 commit comments

Comments
 (0)