How to check if tile is available for zoom, x, y before making API call to get tile

  • 21 December 2023
  • 1 reply

Badge +1

We are loading PlanetScope and SkySat tiles into an application using Google Maps API V3. It automatically requests tiles via the Planet API based on zoom level and x and y values.

Since Planet scenes may not take up the entire bounding box of the map, we are sometimes calling the API for x and y values that may not produce a tile.

Is there a way of checking ahead of time whether a tile is available at the x and y location so as to reduce the calls to the Planet API if there is no tile there? We call the API on the server so as to hide the API key, then return the resulting PNG file to the browser.

Many thanks for your help,


1 reply

Userlevel 1
Badge +3

Hey Dan, I am curious which API you are using, I imagine it is the Tile Services API but I was wondering if you were also using the data API? 

Are you streaming Planet Scope Scenes or a basemap product? If you are streaming a basemap product my first guess is that you are zoomed past L16, which is our highest zoom level for basemaps and because of that the tiles arent at your x any y values. 

If you are streaming Planet scope scenes, how are you currently getting the specific scene ID you are trying to stream?