leaflet coordinates not working - leaflet

Leaflet Maps Images
KML:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
<Placemark>
<name>10 Downing Street</name>
<description>Test</description>
<Point>
<coordinates>45.7251809,-75.0467511,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>
Why the point is not showing at the exact LAT/LONG, it show on top of the leaflet map...
Google map show the correct lat Google Maps

I just figured that Leaflet KML coordinates is LNG, LAT and not LAT, LNG
Switching coordinates made it all work

Related

Mapbox markers and the centre of the map v marker

See attached image, I have a Mapbox map and a marker that is "centred in the map", what I want is the marker's point to be at the centre (where the red arrow is) and not the middle of the marker.
the marker is Mapbox, setting the lng lat is Mapbox, getting the centre of the map is Mapbox, does anyone know if Mapbox construct the marker in such a way where the end point is the middle?
if not, is there a way to adjust ?
thanks
Martin
for anyone else needing this information
1)
mapbox allows the markers centre to be set when you add the marker, so you can say the centre is top, bottom, centre etc etc
2)
out of the box the mapbox markers are centred in the correct place using "centre". proved this by debugging the GPS from mapbox and comparing to google maps lng,lat and then using every setting to see which one was exactly the same mapping

Openstreetmap & leaflet

I am using Django, leaflet and openstreetmap.org to display the map in osm and topo formats. How to display just the map of a country. For example just display the map of Algeria? Thank you so much.
This trick can achieve what you need.
You can add a geojson file with the geometry of the country you want then customize the polygon to show just the country.
In the next link you will see a code example.
https://codesandbox.io/s/weathered-grass-ytuke?file=/index.html

Can't find a URL satellite map with labels for leaflet with Esri or OpenStreepMap

i'm trying to display a map in flutter using this URL tile, which displays ESRI Sattelite map.
urlTemplate:'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}'
the problem is that URL gives me a map without labels , and i can't find any other url for a satellite map with labels .

Make GIS and draw data on OpenStreeMap

I want to display all of my data (as point with coordinate or make line with multiple points) that I found on google I see that I can use Openstreetmap (OSM) to get the map layers, but I do not know if I can draw points with the data I have in the database.
Another choice is to use Leaflet but I still don't know how to dynamically draw data to the maps. Do you guys have any example or guide?
This is the code I used to display the map I need to the website.
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.openstreetmap.org/export/embed.html?bbox=105.82374572753905%2C9.49511711740931%2C106.68754577636719%2C10.14193168613103&layer=mapnik&marker=9.81868236535723%2C106.25564575195312" style="border: 1px solid black"></iframe>
<br/>
<small>
View Larger Map
</small>

Where can I find country borders that matches MapBox tiles?

I am using Mapbox and Leaflet to visualize a world map.
The map tile is based on the MapBox tiles that you can find and style upon creating MapBox project.
I tried to load the geometries of world countries from Natural Earth with the most accurate scale 1:10m million but I found out that a geojson border of Morocco for example is not matching the the border of Morocco in the MapBox baseline.
So where exactly I can find the geojson border of world countries that matches MapBox tile?
Natural Earth is used at lower zoom levels, at some point it switches to more detailed OSM data from http://openstreetmapdata.com/data.
Hope that helps.