Handling collision in static maps
An app that reads a CSV of researcher locations and generates a collision-free interactive map for Bamfield Marine Sciences Centre.
Bamfield Marine Sciences Centre had a Google Map on their website where someone had to manually drop a pin for each researcher. Since most researchers came from the same fifty universities, the pins stacked on top of each other and you could not see who was who. Updating the map meant editing the embed by hand, so it was a slow process that rarely happened.
The solution was an app that reads a CSV file and exports a map file ready for the website. When multiple researchers share a location, the app shifts their pins by a tiny amount so they do not overlap and every name shows up when clicked. The app itself does not stay running on the internet, it is a tool for making the map, not for hosting it. The map is just a file, no server needed, with no monthly cost. When the data changes, user uploads the new CSV file, download the new map, swap the file. That is all there is to it.
The map is still live at https://bamfieldmsc.com/research-overview .
Where do our researchers come from? Check out our new interactive map! https://t.co/D5glRaTHuI@UVicScience @ubcscience @SFU_Science @ualbertaScience @UofC_Science
— Bamfield MSC (@BamfieldMSC) September 28, 2021
constructed by: @hamzaonde pic.twitter.com/hPc9ChceHD