holoviewsgeoviews

Geoviews map WMTS starting 'box'


Is there a way in Geoviews to always display only a small box / portion of the map rather than the whole world zoomed out? It seems to always begin such that the entire world is displayed. I was wondering if there is any option to choose the min/max latitude and min/max longitude?


Solution

  • If you display a WMTS element on its own it will default to a global view. You can however override that by setting the extents on the element, e.g.:

    gv.WMTS(some_url, extents=(-70, 20, -50, 30))
    

    The extents are defined a 4-tuple of the (left, bottom, right, top) edges. However if you overlay some actual data on top of a tile source it should automatically set the extents to the range of your data.