Cropwise
powered by syngenta

REMOTE SENSING

Using the Map Tiles API

Requirements:

Tile rendering is a powerful way to visualize remote sensing data on maps. The Map Tiles API allows you to render images as tiles, which can be used in various map engines.

The endpoint for the Map Tiles API is:

`https://api.remote-sensing.cropwise.com/images/${imageId}/${subproduct}/${rasterType}/tiles/{z}/{x}/{y}/png?session_token=${sessionToken}`

See the Tiles API docs for more details on the parameters.

Remember: When using the endpoint in the examples below, you should only replace the placeholders with the actual values, such as image_id, subproduct, raster_type, and session_token, not the {z},{x}, and {y}. These will be automatically filled in by the map rendering library you are using.

Setting up with Mapbox

See this example for how to use the Map Tiles API with Mapbox GL JS.

When filling the tiles array, you can use the following format:

    'tiles': [`https://api.remote-sensing.cropwise.com/images/${imageId}/${subproduct}/${rasterType}/tiles/{z}/{x}/{y}/png?session_token=${sessionToken}`]

Setting up with Leaflet

See this example for how to use the Map Tiles API with Leaflet.

When adding a tile layer in Leaflet, you can use the following format:

L.tileLayer(`https://api.remote-sensing.cropwise.com/images/${imageId}/${subproduct}/${rasterType}/tiles/{z}/{x}/{y}/png?session_token=${sessionToken}`, {
    maxZoom: 18,
    attribution: 'Cropwise Remote Sensing'
}).addTo(map);