15 lines
495 B
JavaScript
Executable File
15 lines
495 B
JavaScript
Executable File
let span = document.getElementById('latlng');
|
|
let coordinates = span.innerHTML;
|
|
|
|
lat = coordinates.split(",")[0];
|
|
lng = coordinates.split(",")[1];
|
|
let latlng = L.LatLng(lat, lng);
|
|
var mymap = L.map('checkmap').setView([lat, lng], 13);
|
|
|
|
|
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
|
}).addTo(map);
|
|
|
|
|
|
let marker = L.marker([lat, lng], draggable = false).addTo(mymap); |