diff --git a/docs/Map-API.md b/docs/Map-API.md index 67db68e6..faa5e84d 100644 --- a/docs/Map-API.md +++ b/docs/Map-API.md @@ -398,6 +398,19 @@ POST /api/v1/map/named } } ] + }, + "view": { + "zoom": 4, + "center": { + "lng": 0, + "lat": 0 + }, + "bounds": { + "west": -45, + "south": -45, + "east": 45, + "north": 45 + } } } ``` @@ -410,6 +423,16 @@ POST /api/v1/map/named - **valid_tokens** when `"method"` is set to `"token"`, the values listed here allow you to instantiate the named map. - **placeholders**: Variables not listed here are not substituted. Variables not provided at instantiation time trigger an error. A default is required for optional variables. Type specification is used for quoting, to avoid injections see template format section below. - **layergroup**: the layer list definition. This is the MapConfig explained in anonymous maps. See [MapConfig documentation](https://github.com/CartoDB/Windshaft/blob/master/doc/MapConfig-1.1.0.md) for more info. +- **view** (optional): extra keys to specify the compelling area for the map. It can be used to have a static preview of a named map without having to instantiate it. It is possible to specify it with `center` + `zoom` or with a bounding box `bbox`. Center+zoom takes precedence over bounding box. + - **zoom** The zoom level to use + - **center** + - **lng** The longitude to use for the center + - **lat** The latitude to use for the center + - **bounds** + - **west**: The western point for the bounding box + - **south**: The southern point for the bounding box + - **east**: The eastern point for the bounding box + - **north**: The northern point for the bounding box #### Template Format