Leaflet / Leaflet.VectorGrid

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

How to replace a circle with a square, a pentagon or icons? #231

Closed zeroHW closed 4 years ago

zeroHW commented 4 years ago

There are many requirements in my project, such as filling lines and polygons with texture pictures and replacing circles with icons.How should this be done?Who guys has a good implementation can tell me?Thank you very much!

IvanSanchez commented 4 years ago

Hi, great to hear that you find Leaflet useful!

However, this issue tracker is used for reporting bugs and discussing new features. For questions on using Leaflet, please use gis.stackexchange.com or stackoverflow.

If you are really sure that this is a bug in leaflet, or a feature request, please change the wording to make it look like a bug report.

zeroHW commented 4 years ago

@IvanSanchez Maybe I didn't make it clear. Leaflet.VectorGrid is being used in my project, but protobuf vector tiles cannot be filled with pictures or icons.Therefore, I raised this question.

IvanSanchez commented 4 years ago

protobuf vector tiles cannot be filled with pictures or icons.

Yes they can.

marcodelmoral commented 4 years ago

protobuf vector tiles cannot be filled with pictures or icons.

Yes they can.

How?

IvanSanchez commented 4 years ago

How?

https://github.com/Leaflet/Leaflet.VectorGrid/blob/master/docs/demo-points-icons.html

marcodelmoral commented 4 years ago

How?

https://github.com/Leaflet/Leaflet.VectorGrid/blob/master/docs/demo-points-icons.html

Thank you very much for the quick response. Does this work with the slicer too? I've tried to change the icon based on a property value with no avail.