We are migrating an existing Cuba project (version 7.2.23) into a JMIX project (version 3.1.0).
We were using the Charts add-on in Cuba to display some Polygons.While checking the Maps add-on in JMIX, we have noticed that some features were not available in JMIX anymore and we were wondering if it was planned to implement them :
we were using the addPolygonRightClickListener in MapViewer
we were also using the createInfoWindow in MapViewer.
If it is not planned to implement these features, could you advise on the appropriate way to replace them ?
I’ve prepared a demo project that shows how to implement both features as a workaround in a Jmix 3.1 project: demo-maps.zip (129.9 KB)
Take a look at PolygonWorkaroundView and at GeoMapRightClick and MapInfoWindow in the demo project. Note that after GeoMapRightClick.enable(map) right clicks come through the same click events as left clicks, so check getMouseEventDetails().getButton() in your click listeners.
Both helpers rely on internal parts of the map’s client-side component, so they may need adjustments after an add-on upgrade.