@@ -304,9 +304,9 @@ Refer to the <a href="https://github.com/xbgmsharp/piwigo-openstreetmap/wiki" ta
304304function 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]);
0 commit comments