If you want to replicate the EqualStreetNames project in your city, here is the how-to !
-
Click on the "Use this template" button above
-
Find the OpenStreetMap relation of your city (example, Brussels)
-
Add the relation identifier in
config.php
(example for Brussels)- 'relationId' => 0, + 'relationId' => 54094,
-
Update the Overpass queries :
overpass/relation-full-json
(example for Brussels)- ( area["admin_level"=""]["wikidata"=""]; )->.a; + ( area["admin_level"="8"]["wikidata"="Q12994"]; )->.a;
overpass/way-full-json
(example for Brussels)- ( area["admin_level"=""]["wikidata"=""]; )->.a; + ( area["admin_level"="8"]["wikidata"="Q12994"]; )->.a;
-
Update the HTML files (replace
MyCity
by the name of your city in all theindex.html
files, add languages, ...). Don't forget to setapp.countries
to the correct value in theindex.html
files. Optionally you can change the style usingapp.style
, it can be a Mapbox pre-defined style (see API Reference) or your custom style (see Style Specification)
-
Let us know you're ready to add a new city to the project by opening a new issue.
-
You have 2 options:
-
Transfer your repository to the EqualStreetNames organization.
If you choose to do so, you stay of course "owner" of the repository, we'll create a team for you (and anyone you want) that will have admin rights on your repository.
We'll help you maintain and manage your repository.
We'll also setup an automated data update (usually once a week) and automated deployment of the website (if you need it). -
Keep the ownership of your repository.
We'll just link your repository as sub-module in the
cities
folder.
You'll have to maintain your repository, update the data, and the sub-module yourself.
-
-
Clone the main repository
git clone https://github.com/EqualStreetNames/equalstreetnames.git
-
Copy/Link your repository in the
cities
folder of the main repository (cities/my-country/my-city
). -
Run the data update (in the root folder of the main repository)
composer install composer run update-data -- --city=my-country/my-city
-
Run the website locally (in the root folder of the main repository)
-
If you're still in the process of testing, you might need to add your city to the
package.json
beforehand.In the
"scripts"
section:+ "serve:my-country:my-city": "parcel serve \"cities/my-country/my-city/html/**/index.html\" --global app --out-dir dist/my-country/my-city"
In the
"staticFiles"."staticPath"
section:+ { + "outDirPattern": "**/dist/my-country/my-city", + "staticPath": "cities/my-country/my-city/data" + }
-
Create a Mapbox token
-
Create a file named
.env
in the root directory of the project -
Add the following line to the
.env
file:MAPBOX_TOKEN=[your Mapbox token]
replacing[your Mapbox token]
with the token you created -
Install JavaScript dependencies and run it
npm install npm run serve:my-country:my-city
-