====== ThinkGeo Cloud Maps Vector Tiles ======
ThinkGeo Cloud Maps Vector Tiles serve vector map tiles through XYZ. Check out [[https://samples.thinkgeo.com/cloud/#VectorMaps|ThinkGeo Cloud Vector 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:
* Get a ThinkGeo Cloud Client Key. Check out [[https://wiki.thinkgeo.com/wiki/thinkgeo_cloud_client_keys_guideline|ThinkGeo Cloud Client Keys Guideline]] see how to apply one. It's free for 60 days.
* Visit our [[https://cloud.thinkgeo.com/help/|ThinkGeo Cloud API Explorer]], click the "Authorize" button at the top and enter your client credentials. You are then free to play with all the APIs online.
//**ThinkGeo Cloud provides a RESTful API to consume the map tiles**://
==== Get Maps Vector Tile By XYZ ====
Get the vector tile at the specified zoom level and X/Y coordinate, using the supplied parameters.
HTTP GET
https://cloud.thinkgeo.com/api/v1/maps/vector/{srid}/{tileZ}/{tileX}/{tileY}.pbf?apikey={key}
* srid: The spatial reference system ID for the tile you are requesting. Currently only "3857" (Spherical Mercator) is supported.
* tileZ: The Z index (zoom level) of the requesting tile, from 0 to 19. Zoom Level 0 is the highest zoom level with the entire world in one single tile. Each zoom level z has 4z tiles for the entire world. The greater the z value, the closer to the Earth's surface the current zoom level is.
* tileX: The X index (column index in the tiling matrix) of the requesting tile. Valid range is between 0 and 4z for each given zoom level z.
* tileY: The Y index (row index in the tiling matrix) of the requesting tile. Valid range is between 0 and 4z for each given zoom level z.
* apikey: The ThinkGeo Cloud API key that authenticates your request.
Here is an example of a vector tile request URL: [[https://cloud.thinkgeo.com/api/v1/maps/vector/streets/3857/0/0/0.pbf?apiKey=apiKey]] (a valid API key is required). Please check out [[thinkgeo_cloud_client_keys_guideline|Client Keys Guideline]] to find out how to get your own API key.
===== Why Vector Tiles?=====
Vector tiles allows for more efficient downloads and more rapid map updates than pre-rendered raster tiles. When changes are made to the OSM base layer, rather than waiting for an image tile to be redrawn, only the coordinates and drawing instructions for that particular building or road need to be updated. Depending on the URL syntax, vector tiles can return all of the OSM data, or just individual layers, or combinations of layers, including water, earth, land-use, roads, buildings and other points of interest.
===== Map Data Coverage=====
Map Suite Vector Tile Data sources from OpenStreetMap and Natural Earth are both open data sets. The data is updated twice a month on ThinkGeo servers keeping up with the latest data available. Generally speaking, Natural Earth is used at lower zoom levels, and OpenStreetMap is serving for higher zoom levels.
* **OpenStreetMap**
In the of your HTML page, add a div with "id="map""
Create the map object and load with the "DIV" created before.
var worldstreetsStyle = "https://cdn.thinkgeo.com/worldstreets-styles/3.0.0/light.json";
var worldstreets = new ol.mapsuite.VectorTileLayer(worldstreetsStyle,
{
apiKey:'your-ThinkGeo-Cloud-Service-key'
});
let map = new ol.Map({
layers: [worldstreets],
target: 'map',
renderer: 'webgl',
view: new ol.View({
center: [-10775718.490585351, 3868389.0226015863],
zoom: 4,
maxResolution: 40075016.68557849 / 512
}),
});
**NOTE:**
* **ThinkGeo Cloud Service key**
Coming soon
* Sample code: [[https://github.com/ThinkGeo/ThinkGeoCloudVectorMapsSample-ForWinforms|ThinkGeoCloudVectorMapsSample-WinForms]] for [[map_suite_desktop_for_winforms|Map Suite Desktop For WinForms]]
* Sample code: [[https://github.com/ThinkGeo/ThinkGeoCloudVectorMapsSample-ForWpf|ThinkGeoCloudVectorMapsSample-WPF]] for [[map_suite_desktop_for_wpf|Map Suite Desktop For WPF]]
* Sample code: [[https://github.com/ThinkGeo/SpatialQueryThinkGeoVectorMapsSample-ForWpf|SpatialQueryThinkGeoVectorMapsSample-WPF]] for [[map_suite_desktop_for_wpf|Map Suite Desktop For WPF]]
* Sample code: [[https://github.com/ThinkGeo/ThinkGeoMBTilesMapsSample-ForWpf|ThinkGeoMBTilesMapsSample-WPF]] for [[map_suite_desktop_for_wpf|Map Suite Desktop For WPF]]
* Sample code: [[https://github.com/ThinkGeo/ThinkGeoCloudVectorMapsSample-ForiOS|ThinkGeoCloudVectorMapsSample-iOS]] for [[map_suite_mobile_for_ios|Map Suite Mobile For iOS]]
* Sample code: [[https://github.com/ThinkGeo/ThinkGeoMBTilesMapsSample-ForiOS|ThinkGeoMBTilesMapsSample-iOS]] for [[map_suite_mobile_for_ios|Map Suite Mobile For iOS]]
* Sample code: [[https://github.com/ThinkGeo/ThinkGeoCloudVectorMapsSample-ForAndroid|ThinkGeoCloudVectorMapsSample-Android]] for [[map_suite_mobile_for_android|Map Suite Mobile for Android]]
* Sample code: [[https://github.com/ThinkGeo/ThinkGeoMBTilesMapsSample-ForAndroid|ThinkGeoMBTilesMapsSample-Android]] for [[map_suite_mobile_for_android|Map Suite Mobile for Android]]
* Sample code: [[https://github.com/ThinkGeo/ThinkGeoCloudVectorMapsSample-ForWebApi|ThinkGeoCloudVectorMapsSample-WebApi]] for [[map_suite_web_for_webapi|Map Suite Desktop For WebApi]]
==== 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 [[https://www.nuget.org/packages/ThinkGeo.Cloud.Client|NuGet]]. IntelliSense hints will help you get started, and you can also refer to the [[thinkgeo_cloud_.net_client_apis|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 [[https://github.com/ThinkGeo?utf8=%E2%9C%93&q=cloud&type=&language=|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);
The API is for downloading the vector tiles. Additional coding is needed to parse or render it.
Native SDKs for //Python//, //iOS// and //Android// are coming soon.
===== Samples =====
Online Sample:
* [[https://samples.thinkgeo.com/cloud/#VectorMaps|ThinkGeo Cloud Vector Tile Online Sample]]
Desktop Sample:
Coming soon
* [[https://github.com/ThinkGeo/ThinkGeoCloudVectorMapsSample-ForWinforms|ThinkGeoCloudVectorMapsSample-WinForms]] for [[map_suite_desktop_for_winforms|Map Suite Desktop For WinForms]]
* [[https://github.com/ThinkGeo/ThinkGeoCloudVectorMapsSample-ForWpf|ThinkGeoCloudVectorMapsSample-WPF]] for [[map_suite_desktop_for_wpf|Map Suite Desktop For WPF]]
* [[https://github.com/ThinkGeo/SpatialQueryThinkGeoVectorMapsSample-ForWpf|SpatialQueryThinkGeoVectorMapsSample-WPF]] for [[map_suite_desktop_for_wpf|Map Suite Desktop For WPF]]
* [[https://github.com/ThinkGeo/ThinkGeoMBTilesMapsSample-ForWpf|ThinkGeoMBTilesMapsSample-WPF]] for [[map_suite_desktop_for_wpf|Map Suite Desktop For WPF]]
Mobile Sample:
Coming soon
* [[https://github.com/ThinkGeo/ThinkGeoCloudVectorMapsSample-ForiOS|ThinkGeoCloudVectorMapsSample-iOS]] for [[map_suite_mobile_for_ios|Map Suite Mobile For iOS]]
* [[https://github.com/ThinkGeo/ThinkGeoMBTilesMapsSample-ForiOS|ThinkGeoMBTilesMapsSample-iOS]] for [[map_suite_mobile_for_ios|Map Suite Mobile For iOS]]
* [[https://github.com/ThinkGeo/ThinkGeoCloudVectorMapsSample-ForAndroid|ThinkGeoCloudVectorMapsSample-Android]] for [[map_suite_mobile_for_android|Map Suite Mobile for Android]]
* [[https://github.com/ThinkGeo/ThinkGeoMBTilesMapsSample-ForAndroid|ThinkGeoMBTilesMapsSample-Android]] for [[map_suite_mobile_for_android|Map Suite Mobile for Android]]
Web Sample:
Coming soon
* [[https://github.com/ThinkGeo/ThinkGeoCloudVectorMapsSample-ForWebApi|ThinkGeoCloudVectorMapsSample-WebApi]] for [[map_suite_web_for_webapi|Map Suite Web for WebApi]]