FlowingCode / GoogleMapsAddon

Vaadin Addon based on Google Maps Web Component
https://www.flowingcode.com/en/open-source/
Apache License 2.0
20 stars 7 forks source link

Polygon icons get lost after navigation #45

Closed paodb closed 2 years ago

paodb commented 3 years ago

This is visible in the current demo. See attached gif: polygon-icons

javier-godoy commented 2 years ago

Icons are set with executeJS, thus they are not preserved after a detach/attach cycle:

https://github.com/FlowingCode/GoogleMapsAddon/blob/9f23b532c092c03d6c50503bb9808d2c5ed5b630/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapPolygon.java#L184-L189

paodb commented 2 years ago

I've been taking a look at this issue and I think I found a solution, but in order to be able to set the icons without calling executeJs I need to do a minor modification on the web-component first.

paodb commented 2 years ago

Just created PR. No need for any update on web-component (thanks @javier-godoy for the help!)