This is a simple service for retrieving/interacting with the 4k world map data. The data exclusively belongs to 4k world map project.
You must have Docker installed. If you are using Docker for Mac, make sure to share the repo directory.
Please also install Git LFS. Our map files are large enough to have trouble fitting in a normal repo.
To develop the application run ./start.dev
To simplify the data before publishing we import and restructure it from the individual regions and maps to flat files. Update the individual files unders maps
and then run either of the following:
node ./data/map.importer.js
node ./data/region.importer.js
Get the list of root regions.
# REQUEST
GET /regions
# RESPONSE
content-type: application/json
{
"_self": "/regions",
"roots": [
{
"regionKey": "ABW",
"href": "/regions/ABW"
}
...
]
}
Get basic data about the region.
# REQUEST
GET /regions/CAN-MAN
# RESPONSE
content-type: application/json
{
"_self": "/regions/CAN-MAN",
"regionKey": "CAN-MAN",
"label": "Manitoba",
"country": "Canada",
"center": {
"latitude": -97.3639242589,
"longitude": 55.0593228371
},
"parentRegion": {
"regionKey": "CAN",
"href": "/regions/CAN"
},
"children": []
}
Get the geojson defining the shape of the region.
# REQUEST
GET /geojson/CAN-MAN
# RESPONSE
content-type: application/json
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-98.1205501734768,
54.2802499570956,
0
],
...
[
-98.1205501734768,
54.2802499570956,
0
]
],
...
[
[
-100.028849917578,
53.0991501003509,
0
],
...
[
-98.1927499943503,
57.6727498603561,
0
]
]
]
},
"properties": {
"regionKey": "CAN-MAN"
}
}
We maintain an active backlog of new features and bugs we would love your help with.
Have a great idea or change you want to share? Awesome. We actively welcome pull requests:
- Fork the repo and create your branch from
master
. - If you've added code that should be tested, add tests.
- If you've changed APIs, update the documentation.
- Ensure the test suite passes.
- Make sure your code lints.
We have adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.
We are running the site using Zeit now.
Deploy using:
now --docker --public
Test the new site to make sure the basics work.
Then alias the new deployment to update the main site:
now alias 4k-yhgtxlebeu.now.sh 4kmaps
This project is Apache 2.0 Licensed. We also provide an additional patent grant.