Skip to content

Instantly share code, notes, and snippets.

@ccev
Last active April 11, 2021 21:27
Show Gist options
  • Save ccev/47b6de2a2f4578a06d14058f323ba0ba to your computer and use it in GitHub Desktop.
Save ccev/47b6de2a2f4578a06d14058f323ba0ba to your computer and use it in GitHub Desktop.
Flo Tileserver Static Maps with a satellite part
{
"grid": [
{
"direction": "first",
"maps": [
{
"direction": "first",
"map": {
"style": "osm-bright",
"latitude": #(lat),
"longitude": #(lon),
"zoom": 16,
"width": 350,
"height": 250,
"scale": 2,
"markers": [
{
"url": "https://raw.githubusercontent.com/whitewillem/PogoAssets/resized/icons_large/pokemon_icon_#pad(id, 3)_#if(form > 0):#(form)#else:00#endif.png",
"latitude": #(lat),
"longitude": #(lon),
"width": 20,
"height": 20
}
],
"circles": [
{
"fill_color": "rgba(255,255,255,0.6)",
"stroke_color": "\#C7C7C7",
"stroke_width": 1,
"latitude": #(lat),
"longitude": #(lon),
"radius": 40
}
]
}
},
{
"direction": "right",
"map": {
"style": "mapbox-sattelite",
"latitude": #(lat),
"longitude": #(lon),
"zoom": 18,
"width": 400,
"height": 500,
"scale": 1,
"markers": [
{
"url": "https://raw.githubusercontent.com/whitewillem/PogoAssets/resized/icons_large/pokemon_icon_#pad(id, 3)_#if(form > 0):#(form)#else:00#endif.png",
"latitude": #(lat),
"longitude": #(lon),
"width": 60,
"height": 60
}
],
"circles": [
{
"fill_color": "rgba(255,255,255,0.4)",
"stroke_color": "rgba(255,255,255,0.25)",
"stroke_width": 1,
"latitude": #(lat),
"longitude": #(lon),
"radius": 40
}
]
}
}
]
}
]
}

Sample

Usage

  • Put TILE_URL_MAPBOX_SATTELITE: https://api.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}{@scale}.{format}?access_token=MAPBOX_KEY in tileserver's docker-compose.yml under environment:
  • Copy the template in the Templates folder of your tileserver directory. You can now access it with:

https://tiles.URL.com/multistaticmap/TEMPLATENAME?lat=LATITUDE&lon=LONGITUDE&id=MONID&form=FORMID

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment