react-leaflet-vectorgrid icon indicating copy to clipboard operation
react-leaflet-vectorgrid copied to clipboard

Vectorgrid for Multipolylines

Open Lessad opened this issue 6 years ago • 3 comments

Hello :)

First of all thank you your plugin, I'm glad someone found a way to wrap it for React. It works like a charm for large GeoJSON with points.

Sadly this isnt the case for polylines, they are rendering wrong on the map as if the geojson was simplyfied. I have to zoom a lot (zoom level around 25+) to see more points.

Does anyone know a way to make it work like vanilla leaflet ? Here are two screenshots from the React and Vanilla redering. Thank you!

Vanilla Leaflet vecgridnoreact

React Leaflet vgridreact

Lessad avatar Nov 22 '19 13:11 Lessad

After tidying react-leaflet-vectorgrid.min.js I believe that the simplification happens at line 2117. But I can't understand that line enough to suggest any change..

Lessad avatar Nov 22 '19 14:11 Lessad

2 days looking for a solution and I found it!

At the line 2117, col 9074, set tolerance to "tolerance:0.000001" You will get no additional lag and your geojson will look like this:

vgridreact2

Lessad avatar Nov 24 '19 21:11 Lessad

hi @Lessad is it working fine for you now?

varun700 avatar Jun 27 '22 11:06 varun700