From 1207764c1871b19903c7baa8b1d081b7034b07b8 Mon Sep 17 00:00:00 2001 From: csobier Date: Mon, 16 Oct 2017 15:54:49 -0400 Subject: [PATCH] added map tile rendering and MVT info to Maps API doc- WIP --- docs/Map-API.md | 1 + docs/general_concepts.md | 20 +++++++++++++++++++- docs/static_maps_api.md | 3 ++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/docs/Map-API.md b/docs/Map-API.md index 2058740f..456cf379 100644 --- a/docs/Map-API.md +++ b/docs/Map-API.md @@ -17,3 +17,4 @@ You can create two types of maps with the Maps API: * [Anonymous Maps](anonymous_maps.md) * [Named Maps](named_maps.md) * [Static Maps API](static_maps_api.md) +* [MapConfig File Format]([local file in the docs repo](https://github.com/CartoDB/docs/blob/master/_app/_mapsapi/06-mapconfig.md)) diff --git a/docs/general_concepts.md b/docs/general_concepts.md index 0044096e..e34bfbd7 100644 --- a/docs/general_concepts.md +++ b/docs/general_concepts.md @@ -22,6 +22,24 @@ Errors are reported using standard HTTP codes and extended information encoded i If you use JSONP, the 200 HTTP code is always returned so the JavaScript client can receive errors from the JSON object. -## CORS support +## CORS Support All the endpoints, which might be accessed using a web browser, add CORS headers and allow OPTIONS method. + +## Map Tile Rendering + +Map tiles create the graphical representation of your map in a web browser. The performance rendering of map tiles is dependent on the type of geospatial data model (raster or vector) that you are using. + +- **Raster**: Generates map tiles based on a grid of pixels to represent your data. Each cell is a fixed size and contains values for particular map features. On the server-side, each request queries a dataset to retrieve data for each map tile. The grid size of map tiles can often lead to graphic quality issues. + +- **Vector**: Generates map tiles based on pre-defined coordinates to represent your data, similar to how basemap image tiles are rendered. On the client-side, map tiles represent real-world geometries of a map. Depending on the coordinates, vertices are used to connect the data and display points, lines, or polygons for the map tiles. + +**Note:** By default, CARTO uses vector graphics for map rendering. Please [contact us](mailto:support@carto.com) if you need raster rendering enabled as part of your requirements. + +### Mapbox Vector Tiles (MVT) + +[Mapbox Vector Tiles (MVT)](https://www.mapbox.com/vector-tiles/specification/) are map tiles that store geographic vector data on the client-side. Browser performance is fast since you can pan and zoom without having to query the server. + +CARTO uses a Web Graphics Library (WebGL) to process MVT files. This is useful since WebGL's are compatible with most web browsers, include support for multiple client-side mapping engines, and do not require additional information from the server; which makes it more efficient for rendering map tiles. + +**Tip:** You can process MVT files with the [`ST_AsMVT` PostGIS function](https://postgis.net/docs/manual-dev/ST_AsMVT.html) with the [Maps API Windshaft renderer](https://github.com/CartoDB/Windshaft/blob/1000x/lib/windshaft/renderers/pg_mvt/renderer.js). diff --git a/docs/static_maps_api.md b/docs/static_maps_api.md index 91db2a6d..34e4e907 100644 --- a/docs/static_maps_api.md +++ b/docs/static_maps_api.md @@ -152,7 +152,8 @@ It is important to note that generated images are cached from the live data refe * Timeout limits for generating static maps are the same across CARTO Builder and CARTO Engine. It is important to ensure timely processing of queries. * If you are publishing your map as a static image with the API, you must manually add [attributions](https://carto.com/attribution) for your static map image. For example, add the following attribution code: -{% highlight javascript %}attribution: '© OpenStreetMap contributors, © CARTO +{% highlight javascript %} +attribution: '© OpenStreetMap contributors, © CARTO {% endhighlight %} ## Examples