function onMapClick(e) { var the_latlng = '[ '+e.latlng.lat.toFixed(6)+', '+e.latlng.lng.toFixed(6)+' ] '; document.getElementById("mapinfo").innerHTML = '<b>Geo-Tag</b>: <meta name="geo.position" content="'+e.latlng.lat.toFixed(6)+';'+e.latlng.lng.toFixed(6)+'" /> position "'+e.latlng.lat.toFixed(6)+';'+e.latlng.lng.toFixed(6)+'"'; var the_center = map.getCenter(); document.getElementById("maparea").innerHTML = 'Center-Zoom-String für SELECT-Feld = ' + the_center.lat.toFixed(5) + ',' + the_center.lng.toFixed(5) + ',' + map.getZoom() + '.'; popup .setLatLng(e.latlng) .setContent('Folgende Position wurde angeklickt:
' + the_latlng + '
') .openOn(map); if(typeof(circle4markers)==='undefined') { circle4markers = new L.circleMarker(e.latlng,{ color: 'red', fillColor: '#f03', fillOpacity: 0.2, radius: 100 }); circle4markers.addTo(map); } else { circle4markers.setLatLng(e.latlng); } } function basename(str, sep) { return str.substr(str.lastIndexOf(sep) + 1); } function strip_extension(str) { return str.substr(0,str.lastIndexOf('.')); } function goto_places( the_place_togo ) { var index = -1; for (var i = 0; i < the_places.length; i++) { if (the_places[i]['name'] == the_place_togo) { index = i; break; } } if ( index > -1) { map.setView([the_places[index]['lat'],the_places[index]['lng']],the_places[index]['lev']) }; }