Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/m-lab/bigquery-maptiles
A service that manages the conversion of M-Lab BigQuery results into static world map tiles
https://github.com/m-lab/bigquery-maptiles
Last synced: about 1 month ago
JSON representation
A service that manages the conversion of M-Lab BigQuery results into static world map tiles
- Host: GitHub
- URL: https://github.com/m-lab/bigquery-maptiles
- Owner: m-lab
- License: apache-2.0
- Created: 2019-08-23T21:13:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-22T23:11:01.000Z (over 1 year ago)
- Last Synced: 2024-10-29T14:53:41.587Z (about 2 months ago)
- Language: HTML
- Size: 10.7 KB
- Stars: 3
- Watchers: 14
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bigquery-maptiles
Build container:
```sh
docker build -t bigquery-maptiles .
```Generate input data:
```sh
docker run -e PROJECT=mlab-sandbox -v $PWD:/maptiles \
-v ~/.config/gcloud:/root/.config/gcloud -it bigquery-maptiles \
./prep-geojson-input.sh mlab-sandbox
```NOTE: if the html and tiles are served from different domains we'll need to
apply a CORS policy to GCS.## CORS
NOTE: may not be needed if served from an iframe.
* create a GCS bucket for the tile data.
* set defacl on bucket:```sh
gsutil defacl set public-read gs://bigquery-maptiles-mlab-sandbox/
```* set cors policy on bucket, so requests evaluate `Access-Control-Allow-Origin`
headers correctly.```sh
gsutil cors set cors.json gs://bigquery-maptiles-mlab-sandbox
````cors.json` contains, a project-specific origin (origin URLs are examples):
```
[
{
"origin": ["http://localhost:4000", "https://grafana.mlab-sandbox.measurementlab.net"],
"responseHeader": ["Content-Type"],
"method": ["GET", "HEAD", "DELETE"],
"maxAgeSeconds": 3600
}
]
```