[GIS] GeoJSON Rendering in Leaflet

geojsonleafletrendering

I have published a wms using the QGIS Cloud and on top of it I am overlaying the same data (countries of Europe), using GeoJSON. Have a look at an example here: http://jsfiddle.net/j21kh7ao/
At a low zoom level, the geometries don't overlap 100%. When zooming in, the differences start to disappear.

Any idea why this happens? To me it seems Leaflet is using some zoom based generalization for the geojson, could it be possible?

Best Answer

Leaflet's GeoJSON uses by default a smoothing factor which eliminates less important points. Pass {smoothFactor: 0} to L.geoJson as an option to achieve a more appropriate overlap.