You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@thet@petschki A discussed yesterday on discord I'm posting this issue on the pat-leaflet repo, but I'm not sure yet technically how/if the code here is used in Plone 5.2 / Plone 6.
So have set up some content to use the geolocationbehavior on a Plone 5.2.7 Python3.8.12 setup.
plone.patternslib (pat-leaflet for Plone < 6) (1.2.2.dev0 main/master branch)
The first issue I noticed is that the map didn't initialise the background or location until I used a control to jump to my current location. I solved this with specifying coordinates in the control panel, but these were then also used as default values and I found @laulaz branch that fixes this double role (Default location collective/plone.formwidget.geolocation#32)
With correct lat/long values the leaflet map initalises correctly in the center of the country/website for which my setup is needed.
(There's another minor issue here: the control panel fields give a decimal error when you try to use more than 3 digits behind the . or , I suspect a dot/comma internationaliastion issue here. The lat/long fields in the behavoir doen't have this problem)
The second issue is that sometimes the red marker that connects to the lat/long fields below the map sometimes disappers when you try to inser a location. This for example happens when using the built-in and default configure street address lookup. Most of the time when a valid location is found the map jumps to that address and the marker is reposiioned there. And you can then drag the marker and see the lag/long update. The address seek control shows a spinner in it's icon that doesn stop, you are moved to the location (Brussels, Amsterdam) but the red marker is gone.
When I add the add'ons above to a clean Plone 5.2.8.dev0 coredev buidout and set the resources to develop and I develop the pat-leaflet bundlle I can see a traceback at exactly this line (well the developer tools report the line in the MarkerCluster-src.js bundle)
@thet @petschki A discussed yesterday on discord I'm posting this issue on the pat-leaflet repo, but I'm not sure yet technically how/if the code here is used in Plone 5.2 / Plone 6.
So have set up some content to use the geolocationbehavior on a Plone 5.2.7 Python3.8.12 setup.
The packages involved are:
With correct lat/long values the leaflet map initalises correctly in the center of the country/website for which my setup is needed.
(There's another minor issue here: the control panel fields give a decimal error when you try to use more than 3 digits behind the . or , I suspect a dot/comma internationaliastion issue here. The lat/long fields in the behavoir doen't have this problem)
When I add the add'ons above to a clean Plone 5.2.8.dev0 coredev buidout and set the resources to develop and I develop the pat-leaflet bundlle I can see a traceback at exactly this line (well the developer tools report the line in the MarkerCluster-src.js bundle)
https://github.com/plone/plone.patternslib/blob/061473c1026f1a3a01d27c4ea5d33c9095b054fd/src/plone/patternslib/static/components/leaflet.markercluster/src/MarkerClusterGroup.js#L863
I think it tries to adapt the zoomlevel but in some instances the parent object doesn't exist, so you see
I do suspect some timing/race condition as the error seems more difficult to trigger when in development mode.
The text was updated successfully, but these errors were encountered: