Synchronized Map browsing - datameet-pune/datameet-pune.github.io GitHub Wiki
Aim
- Have multiple map elements on a single web page that are synchronized with each other, ie, when user pans and zooms to a location in one map, other maps should mirror the action.
- Even the mouse position should be reflected in the other maps and precise lat-long of mouse should be clearly displayed and possible to retrieve using keyboard shortcuts.
- Make it possible to load different backgrounds and geo-data in the respective maps.
Example idea
Browsing assembly constituencies on one map, and village boundaries in another map, and water acquifer data in a third map.
How this can be useful
- There are limits to how many things you can overlay on a map one on top of the other. Too many layers would make things confusing.
- It may be better to load maps side by side with one map showing one set of data, other map showing another set of data. And the maps are in sync.
Code resources
- https://github.com/jieter/Leaflet.Sync : Leaflet.Sync plugin See code example
Applications
- Pune ward maps : side-by-side compare 2007-12, 2012-17, 2017-22 maps -- Implemented by Nikhil, more work like labels possible
- https://punecycleplan.wordpress.com/preliminary-draft/ Pune Cycle Plan : there is a lot of map data here like routes, repair shops, parking spaces displayed in different map embed frames, where we could apply synchronized viewing.
- Create a map comparison app page where user can upload multiple shapefiles in respective maps.
Links
- http://maps.stamen.com/#terrain/16/18.5242/73.8605 : Stamen Maps front page, big map and inset two maps are synchronized.