Table of Contents

ThinkGeo Cloud Map Raster Tiles

ThinkGeo Cloud Raster Tile serves raster map tiles through XYZ. Check out ThinkGeo Cloud Raster Map Online Sample for a quick look.

RESTful APIs

* Try it Online: All the ThinkGeo Cloud RESTful APIs can be tested online following the instructions below:

ThinkGeo Cloud provides a RESTful API to consume the map tiles:

Get Maps Raster Tile By XYZ

Get the raster tile at the specified zoom level and X/Y coordinate, using the supplied parameters.

HTTP GET 
https://cloud.thinkgeo.com/api/v1/maps/raster/{style}/x{resolution}/{srid}/{tileSize}/{tileZ}/{tileX}/{tileY}.{fileExtension}?apikey={key}

URL Parameters

Here is an example of a raster tile request URL: https://cloud.thinkgeo.com/api/v1/maps/raster/light/x1/3857/512/0/0/0.png. When no API key is specified, the tile will be watermarked with a ThinkGeo logo. To remove the watermark, a valid ThinkGeo Cloud API key is required. Please check out Client Keys Guideline to find out how to get your own API key.

Visit GetMapsRasterTileByXyz and click “Try It Out” to explore this API online.

Map Data Coverage

Map Suite Raster Tile Data is composed of street tiles and aerial images tiles.

Our World Map data can be purchased separately. It can be consumed offline by Map Suite SDKs. Check out Maps Streets Offline Data and Maps Imagery Offline Data for detail.

Consume from Client Side

Multiple ways are provided to consume the server from different platforms.

From JavaScript Library

OpenLayers and Leaflet have built-in classes consuming the tiles through XYZ. Here is the code snippet in OpenLayers.

var lightLayer = new ol.layer.Tile({
  source: new ol.source.XYZ({
	urls: [
	  "https://cloud.thinkgeo.com/api/v1/maps/raster/light/x1/3857/512/{z}/{x}/{y}.png?apikey=yourkey",
	],
	tileSize: 512
  }),
  name: "lightLayerKey"
});

The sample code in LeafLet:

var lightLayer = L.tileLayer("https://cloud.thinkgeo.com/api/v1/maps/raster/light/x1/3857/512/{z}/{x}/{y}.png?apikey=yourkey");

Here is an Online Sample consuming the map tiles using OpenLayers.

From Map Suite UI Controls

All of the MapSuite UI Controls have built-in a straightforward way for consuming the raster tiles.

Sample Code:

using ThinkGeo.Cloud;
 
// Setup the overlay
ThinkGeoCloudMapsOverlay thinkGeoMapsOverlay = new ThinkGeoCloudMapsOverlay("Your Client ID", "Your Client Secret");
// or ThinkGeoCloudMapsOverlay thinkGeoMapsOverlay= new ThinkGeoCloudMapsOverlay("Your apiKey");
Map.Overlays.Add(thinkGeoMapsOverlay);

Consume From Client Side SDKs

Our .NET SDK ThinkGeo Cloud Client makes it easy to consume all of the ThinkGeo Cloud services in your applications. It's available on NuGet. IntelliSense hints will help you get started, and you can also refer to the ThinkGeo Cloud Client API list for details.

At the NuGet Package Manager terminal, you can install this package by running the command: Install-Package ThinkGeo.Cloud.Client -Version VERSION_TO_BE_INSTALLED. You can also check out ThinkGeo on GitHub for samples utilizing the ThinkGeo Cloud Client.

Sample Code:

using ThinkGeo.Cloud;
 
MapsClient client = new MapsClient("Your Client ID", "Your Client Secret");
Stream imageStream = client.GetRasterTile(z, x, y, projection, mapType, tileSize, tileResolution);

Native SDKs for Python, iOS and Android are coming soon.

Samples

Online Sample:

Desktop Sample:

Web Sample:

Mobile Sample: