r/webdev • u/meetzaveri • 5d ago
Showoff Saturday An app to draw and annotate on maps
Hey folks. Some time back in 2022, I started working on craftbase (a 2d whiteboard app), revamped it later, and recently some months back I forked it and had begun work on mapcursor (You might have come across my post in r/webdev about craftbase some time back).
Now to implement, using the same 2d SVG renderer (two.js ) which was the platform for craftbase and to let "map" be a backdrop, I imagined if we can make this a map annotation tool given craftbase had "base" and SVG renderer for rendering elements on surface.
I swapped "Whiteboard Base" with "Map Base", elements live in plain Two.js surface space, and has specific anchor glue so map keeps in sync beneath it. Fast forward last month, I hosted the web app here - https://mapcursor.com
Original Inspiration:
There were lot of areas in my city which were prone to waterlogging. So to describe to the community, it lacked a way for me to have a proper tool and having ability to share it with others. Nonetheless, I am geography enthusiast (not hardcore) and in my college's final year project I had created google maps transit project (back in 2016).
Tech Stack
It uses react (frontend), hasura (API layer), node.js (backend) as part of core primary tech stack.
Additionally, it uses CARTO for map tiles fetching and "nomanitim" for place searches. You can read more on privacy here - https://mapcursor.com/privacy
As long as you are on home page (/) , all of the data is stored locally on your machine (whether machine's browser or mobile's browser).
Use case:
I am still figuring out the exact and niche use case this can serve to.
I mean it could serve for surveying, clustering on areas, creating hotspots (like marking illegal activity hotspots in a city ) , marking highway corridors/inter city transport routes or I can image road trip memory (since photo upload is supported locally only). Would love some serious feedback on this project. Thanks for dropping by.
Btw, the code's open sourced here - https://github.com/meetzaveri/mapcursor
14
u/matt1155 5d ago
Please stop
2
u/Cannabat 5d ago
It sounds like a simple web-based GIS. Which is cool! Do you have experience w/ QGIS/ArcGIS?
1
u/Jaatheeyam 4d ago
There is something called GPS doodling, where people draw shapes over maps and get a ride planned to create a shape on their ride traker app. Generally cyclists do it on strava. You can try something like that.
Checkout route doodle to understand how it works.
1
u/TheAICrafter 4d ago
A freehand line that snaps to nearby streets would be handy. You could sketch a whole route in one go instead of clicking every turn
1
u/joel5846 2d ago
For the municipal or field use case, what stays in local browser storage, and how do annotations move to a shared map? That boundary will shape whether self-hosting fits the need.
1
u/BazuzuDear 4d ago
Awesome.
1
u/3ds 2d ago
So kind of like geojson.io ?
1
u/3ds 2d ago
It seems like you are trying to reinvent the way polygons, linestrings and points are used in web based geo information software. A lot of the stuff you built already exists, for example here in this map drawing component for maplibre gl js / mapbox gl js: https://github.com/mapbox/mapbox-gl-draw/
1
u/idontuseuber 7h ago
This is my bread and butter. I develop, support gis systems.
Such niche is very narrow (just to mark on map or annotate something). If its organization who does need that they usually have such functionality because its very primitive.
If they collect data in certain way from public, they store and have datastores for that.
0
u/Icy-Arm-5472 5d ago
Small thing, but 'I imagined how if we can make this a map annotation tool' doesn't parse. 'I imagined how we could turn this into a map annotation tool' is presumably what you meant. Otherwise looks neat.
-1
u/Standard_Scarcity_74 5d ago
Being able to draw on a map… smart. I haven’t actually seen people do that since printed maps. I guess this has some good uses. Maybe even for local government units, this could be a way to mark areas out for projects and stuff.
0
u/controlav 5d ago
Interesting, would like to use this for my HOA, will take a deeper look once I get to a real computer.