copies the html for each data-geo-place element to a marker for the globe
adds click listeners to those place elements to open the marker and pan to it
The library that I’m using doesn’t have great touch support. You can navigate the globe by tapping the place elements though, so it’s somewhat usable on mobile.
I want to do more globe/mapping components as part of this project. Next might be a lat/lon input for forms, bound to a draggable map.
Hi @forresto! Thanks for sharing this project! It’s been a long time since I’m asking how to order latitude/longitude CMS items by distance from the website visitor location, and you seem to have found a solution! Your sample project doesn’t seem to find my geolocation when I press the button, would it be possible that you have a fresh look on the project? Maybe there are some things to update since it was created?
Thanks in advance!
Folks, make sure you access the HTTPS version of the demo site by @forresto ( https://geo-components.webflow.io ), or modern browser security will silently not prompt you for HTML5 geolocation permission.
CC @WebflowUser
Hi @forresto, two years after your post I’m planning to use your tutorial to order geo-located CMS items by distance, it is the only solution that I have found so far (and it’s awesome many thanks for sharing it ). I just wanted to ask you before reusing the scripts: if you would re-do it now after two years, would you use the same API and code? Thanks!
Hi @forresto I’m transferring my old site to webflow and leaflet custom map that I had made before. In the old one I had all the images and zoom levels saved in separate folders but when trying to incorporate leaflet to webflow I’m not sure if that is possible. Is it? And if it is could you point me in the direction of making it happen? Thanks.