Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

enforce TileJSON bounds #5394

Closed
rm3dbeckers opened this issue Jun 17, 2016 · 5 comments
Closed

enforce TileJSON bounds #5394

rm3dbeckers opened this issue Jun 17, 2016 · 5 comments
Assignees
Labels
Core The cross-platform C++ core, aka mbgl GL JS parity For feature parity with Mapbox GL JS

Comments

@rm3dbeckers
Copy link

rm3dbeckers commented Jun 17, 2016

multiple_layers_bounds_do_not_work

According to https://github.com/mapbox/tilejson-spec/tree/master/2.1.0, there is parameter "bounds", which can be used to define east, south, west, north LatLon bounds on a source, unfortunately this parameter seems to have no effect in a style.json.

We are trying to use our own raster Tilesource (which basically works great), which unfortunately doesn't cover the whole world. So we use another tilesource behind it, and now would like to only request our tiles within given bounds and only request the other tiles outside of the bounds.

The main problem is that right now both sources are being queried inside of the bounds, which of course produces unnecessary traffic and creates an ugly visual effect as you are able to see the unwanted tiles for a short amount of time (or maybe even longer, depending on bandwidth).

@jfirebaugh
Copy link
Contributor

Duplicate of #2329.

@rm3dbeckers
Copy link
Author

There seems to be a misunderstanding.
We don't want to restrict the area, in which the camera can be moved (we want it to be the whole world). We want to restrict the area in which on of the sources, that is used by one of our layers, is being used, so we can achieve something like: In central europe the first source is being used, for the rest of the tiles the other source is being used.
Ideally the bounds could be inverted as well, so we wouldn't have to create 4 different sources to surround the central europe area :)

@jfirebaugh
Copy link
Contributor

Thank you for clarifying!

@jfirebaugh jfirebaugh reopened this Jun 27, 2016
@friedbunny friedbunny added the Core The cross-platform C++ core, aka mbgl label Mar 10, 2017
@jfirebaugh jfirebaugh changed the title Android, bounds: style.json ignores bounds enforce TileJSON bounds Apr 12, 2017
@jfirebaugh
Copy link
Contributor

GL-JS implementation happened in mapbox/mapbox-gl-js#4556.

@jfirebaugh jfirebaugh added the GL JS parity For feature parity with Mapbox GL JS label Apr 12, 2017
@jfirebaugh jfirebaugh self-assigned this Apr 14, 2017
@jfirebaugh jfirebaugh removed their assignment Apr 24, 2017
@femski
Copy link

femski commented Jul 9, 2017

+1
very important for us. It impacts how to structure your application - as one big raster layer or multiple smaller layer. Its impossible to do multiple smaller raster layer without bounds checking upfront. Needlessly querying dozens of sources makes app very very slow.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl GL JS parity For feature parity with Mapbox GL JS
Projects
None yet
Development

No branches or pull requests

5 participants