This is a simple map editor to track unreachable tiles on a map (mercator
projection).
It is built with Deno and Oak, and uses Handlebars for templating.
You will need a Mapbox API key to run this project.
Note
No tests were written for this project.
The main goal was to learn how to use Deno (and
Oak) and run on a VPS.
As the feature set is small, I decided to skip the tests for now.
Good enough software ships faster than perfect software. 🤙 #yoco
The json data for this project is a simple structure, with the bare minimum to represent the unreachable tiles.
Supported tile zooms are 13, 14, 15, 16.
JSON Schema:
{
"name": String,
"city": String,
"country": String,
"tiles_by_zoom": {
"String zoom": [
{
"String x": Integer,
"String y": Integer
}
]
}
}
Example:
{
"name": "Truppenübungsgelände Baumholder",
"city": "Baumholder",
"country": "Germany",
"tiles_by_zoom": {
"13": [
{
"x": 4262,
"y": 2790
}
]
}
}
Show Dependencies
- Deno v2
- Oak v14 (because Deno docs suggested it - hono🔥 has to wait)
- Handlebars v4
- Mapbox GL JS v3
- Bootstrap v5
Show instructions
You need to have a Mapbox API key to run this project. You can get one here.
Copy the .env.init
file to .env
and set the MAPBOX_API_SECRET
variable
with your API key.
$ deno run --allow-net --allow-read --allow-env server.js
Serve the project with Docker in --parallel mode. 🚀
$ docker build -t unreachable-tiles-map-editor .
$ docker run --rm -p 8000:8000 --env-file .env unreachable-tiles-map-editor
Show Features
- Renders Mapbox map
- Users can interact with the map, adding additional polygons of unreachable tiles
- Edit unreachable tiles in multiple tile sizes
- Render json data in a form
- reset form and map
- copy generated json data to clipboard
Show Contributing
- suggest a new area of unreachable tiles (json format from the form)
- screenshot of the area
- short description of the area and some context
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Improving/adding documentation
Feel free to contribute to this project. I suggest you to open an issue describing the feature you want to implement or the bug you found and wait for feedback before starting to code.
Forking this repository and submitting a pull request is the preferred way to contribute.
What I would love to add to this project:
- Adding a test suite 🥰 (Deno tests, for e2e I would prefer
playwright
) - i18n support for Handlebars templates