Pergunta

I'm using the mapbox.js API for building some kind of spatial-data-viewer. In my (spatial) MySQL database, I have a table with 'geometry' elements in it (POINTS). These geometry elements are defined in the Lambert 72 coordinate system (EPSG:31370). My (mapbox) map has the default wgs84 coordinate system.

I succeeded into importing my data from the db into a mapbox-geojson layer (using AJAX with JQuery) with this mysql-to-geojson php script based on geoPHP.

However, the elements still have the coordinates of the lambert72 system, so markers won't be positioned correctly. I know I could use a script to transform these coordinates, but isn't there a 'cleaner' way to get the correct geoJson data (in wgs84 system, instead of lambert72) into my map?

Thanks.

Foi útil?

Solução

You can use proj4leaflet to reproject your lambert72 coordinates to WGS84.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top