I am developing my first leaflet applicaitonsapplications. So this is my trial applicaitonapplication demo.
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
osm = L.tileLayer(osmUrl, {
maxZoom: 18,
});
var map = L.map('map').setView([51.505, -0.09], 12).addLayer(osm);
I am getting the CRS of the map, and CRS is EPSG:3857.
console.log("map crs: " + map.options.crs.code)
I can add a point data with EPSG:4326 coordinates.
L.marker([51.5, -0.09]).addTo(map)
.bindPopup('A popup.')
.openPopup();
But I can not add EPSG:3857 coordinates.
L.marker([5732953.77585,-10018.7582914]).addTo(map)
.bindPopup('A popup.')
.openPopup();
This goes wrong place.