Testing clustered markers we decided against autoload and want to add a refresh button to load new markers when the map has been moved.
Requirements
- Remove autoloading of new markers when the map moves
- Add a button which overlays the map and reloads pins for articles within the given frame
- Button should appear only when the user has zoomed or panned to change the frame view
- Button should disappear on click and only re-appear if the user moves the view again
Mock and specs
- Button should be normal ButtonWidget (icon, progressive)
- Use "Reload" icon
- UI copy: "Reload results"
Align center within button area as shown below. If not possible, center horizontally and set 20px from top edge of map.
Demo
Open question
What should happen when the button is clicked?
We now have solution A implemented without clustering. With clustering we could also go back to our original approach and not reload all points but adding new ones, if we want that.
A: Remove all visible points and load a new set for the visible area (similar to clicking the show button twice).
➕ pro: number of shown points stays the same
➖ contra: might be confusing that some points “disappear”
B: Add more points to the existing ones
➕ pro: showing more additionally points can not be achieved another way, reloading could also be done with clicking the show button twice
➖ contra: might be confusing that the results are different when you disable and re-enable
Implementation
Old: POC that changes the display button into a reload button