- map = new L.map('map', {
- // center: [nominatim_map_init.lat, nominatim_map_init.lon],
- // zoom: nominatim_map_init.zoom,
- attributionControl: (get_config_value('Map_Tile_Attribution') && get_config_value('Map_Tile_Attribution').length),
- scrollWheelZoom: true, // !L.Browser.touch,
- touchZoom: false,
- });
-
- L.tileLayer(get_config_value('Map_Tile_URL'), {
- // moved to footer
- attribution: (get_config_value('Map_Tile_Attribution') || null ) //'© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
- }).addTo(map);
-
- var layerGroup = new L.layerGroup().addTo(map);
-
- var circle = L.circleMarker([lat,lon], { radius: 10, weight: 2, fillColor: '#ff7800', color: 'blue', opacity: 0.75});
- map.addLayer(circle);
-
- if (geojson) {
- var geojson_layer = L.geoJson(
- // http://leafletjs.com/reference-1.0.3.html#path-option
- parse_and_normalize_geojson_string(geojson),
- {
- style: function(feature) {
- return { interactive: false, color: 'blue' };
- }
- }
- );
- map.addLayer(geojson_layer);
- map.fitBounds(geojson_layer.getBounds());
- } else {
- map.setView([lat,lon],10);
+ map = new L.map('map', {
+ // center: [nominatim_map_init.lat, nominatim_map_init.lon],
+ // zoom: nominatim_map_init.zoom,
+ attributionControl: (get_config_value('Map_Tile_Attribution') && get_config_value('Map_Tile_Attribution').length),
+ scrollWheelZoom: true, // !L.Browser.touch,
+ touchZoom: false
+ });
+
+ L.tileLayer(get_config_value('Map_Tile_URL'), {
+ // moved to footer
+ attribution: (get_config_value('Map_Tile_Attribution') || null) // '© <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'
+ }).addTo(map);
+
+ // var layerGroup = new L.layerGroup().addTo(map);
+
+ var circle = L.circleMarker([lat, lon], {
+ radius: 10, weight: 2, fillColor: '#ff7800', color: 'blue', opacity: 0.75
+ });
+ map.addLayer(circle);
+
+ if (geojson) {
+ var geojson_layer = L.geoJson(
+ // https://leafletjs.com/reference-1.0.3.html#path-option
+ parse_and_normalize_geojson_string(geojson),
+ {
+ style: function () {
+ return { interactive: false, color: 'blue' };
+ }
+ }
+ );
+ map.addLayer(geojson_layer);
+ map.fitBounds(geojson_layer.getBounds());
+ } else {
+ map.setView([lat, lon], 10);
+ }
+
+ var osm2 = new L.TileLayer(
+ get_config_value('Map_Tile_URL'),
+ {
+ minZoom: 0,
+ maxZoom: 13,
+ attribution: (get_config_value('Map_Tile_Attribution') || null)