Zig User Map
2021-03-17
Find your favourite Ziguana in real life.
Table of Contents
Find your favourite Ziguana in real life.
Having a user map
The bigger a community gets, the more likely the chance of a meetup is. We recognized this early on in the Zig community and I created a fairly simple user map where people could easily add themselves and also find other community members.
There were no requirements on precision, but the typical recommendation is to use “city precision”.
Since the start of the project, 112 Ziguanas have registered themselves on the map, which is really cool!
Implementation
The map itself is basically just leaflet, a frontend for OpenStreetMap. Adding a thin layer of JavaScript on top to fetch a JSON file from GitHub allows us to easily maintain a user list by just merging a bunch of JSON files that each user authors.
The map now features a side bar that allows finding people on the world map.
Adding yourself
To add yourself, you can just create a Pull Request on the GitHub Repository adding a new file to the people/
folder with a JSON file in the following format:
{
"nick": "xq",
"coordinates": [ 48.77844, 9.18014 ],
"links": {
"Website": "https://random-projects.net",
"GitHub": "https://github.com/MasterQ32"
}
}
You can put arbitrary links there, but those are completly optional. The only two fields required are the coordinates
and the nick
field. This information will then be displayed when clicking on the pin: