Leaflet / Leaflet.VectorGrid

Display gridded vector data (sliced GeoJSON or protobuf vector tiles) in Leaflet 1.0.0
606 stars 194 forks source link

interactive not work in protobuf. #117

Closed cdqrain closed 7 years ago

cdqrain commented 7 years ago

Hi all. I use L.vectorGrid.protobuf to load mapbox vector tile, then set the "interactive: true" and add "mouseover" or "click" event on the layer. but the event was not triggled. I modified the "createTile" function to fit my custom projection, does it effect the interactive ?

IvanSanchez commented 7 years ago

Can you publish a fiddle/codepen/playground that displays this behaviour?

cdqrain commented 7 years ago

Hi IvanSanchez. I have published a plnkr. http://plnkr.co/edit/NQaMXUOx1mRiwTLWY6DW?p=preview

cdqrain commented 7 years ago

Hi IvanSanchez. I have updated my mvt service, now it can load the mvt files.

perliedman commented 7 years ago

I modified the "createTile" function to fit my custom projection, does it effect the interactive ?

@cdqrain does that mean that your example is running a modified version of Leaflet.VectorGrid? That's unfortunately not possible for us to support, especially not when we don't know what those changes are. Please understand that we have limited time to examine issue reports.

If VectorGrid isn't compatible with custom projections, we should start by opening an issue for that and fix it.

cdqrain commented 7 years ago

@perliedman I just only modify "createTile" function. Does it affect the interactive ? I don't know where to start to fix VectorGrid custom projection.

cdqrain commented 7 years ago

@IvanSanchez @perliedman I removed "rendererFactory: L.canvas.tile", the interactive can work.