Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Leaflet documentation said that they has EPSG:3857 as default projection.

Using QGIS with open layer plugin, I point to a location to find it's coordinate. I used EPSG:3857 in QGIS as well.

The problem is, the location doesn't match. I know that the location in leaflet using "lat-long" format, while location in QGIS is using "long-lat" format.

Leaflet documentation said that it used "degree", while (I don't quite sure) I think QGIS use decimal.

Does anybody has experience with this? How is the solution?

Thanks in advance

share|improve this question
add comment

1 Answer

The mismatch, is due to the different projections used for the coordinates.

In Leaflet, the Map is in EPSG:3857, while the coordinates used for various things are in LatLong (EPSG:4326).

In OpenStreetMaps Layer in Qgis, the map and the coordinates both are in EPSG:3857.

So when you see enter image description here in QGIS, these coordinates are in EPSG:3857 with units meters.

You will need to project the coordinates from Web Mercator to WGS84. I don't have much experience with leaflet, but you could have a look at the proj4js Library.

share|improve this answer
    
I also use EPSG:3857 for QGIS. This is indicated by the bottom-right box, isn't it? –  goFrendiAsgard Apr 29 '13 at 4:39
    
You are correct. Whenever you add a layer from the OpenLayers Plugin, the coordinate system for QGIS is changed to EPSG 3857 –  Devdatta Tengshe Apr 29 '13 at 4:43
1  
Keep in mind that the EPSG:3857 units are not real metres. They match only at the equator with metres, and get squuezed the more to the poles you come. –  Andre Joost Apr 29 '13 at 6:42
    
@AndreJoost: My location is near to equator. So I think it shouldn't differ that much –  goFrendiAsgard Apr 30 '13 at 0:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.