Maps combining data as layers on a google spreadsheet
This script should finally create a blank map for local development This includes
- Creating a folder for the new map
- Copy over the mojomaps sample as is to the path, overwriting files ..+ Can also be used for updates
< path to map >
|______mojomaps
|_____js
| |
| |_____mojomaps.js
|
|_____css
| |_____mojomaps.css
| |_____style.css
|
|_____data
| |_____< geojson files go here >
|
|_____mojomap.html (contains key to drive spreadsheet definition for map)
To run the script
- Clone this directory
- Run the following commands
# cd <path to mojomap repo>
# python tools/createmap.py <pathtonewmap>
Viewing the map requires a web server to be installed.
# sudo apt install apache2
# sudo ln -s <path to new map> /var/www/html/<mapname>
The map will now be available in a browser at http://localhost/< mapname >
https://drive.google.com/drive/u/1/folders/1sWy5x1nbcOXa9tUUI_ob8z7qVVqqRv3a
To create your own, simply copy one of the sheets in the folder above to your drive. Make sure to publish the sheet to the web from the "File" menu.
See tutorial here https://support.google.com/docs/answer/183965
Once you have replicated the folder structure and linked mojomaps.html (or your filename of choice) to your spreadsheet, you can add and remove layers as rows in the spreadsheet. Anyone who has edit rights on the spreadsheet can also make those changes. Changes will be picked up by the map on refreshing the page.
- How to turn visibility on and off for different layers - https://www.youtube.com/watch?v=Sd3YFHkVxlk
- How to adjust centering and zoom for the base layer - https://www.youtube.com/watch?v=UrVXHFmZsWs
- How to make your own mojomap and add geojson layers - https://www.youtube.com/watch?v=SlQ_yQnvYOY