Get Vector Style
Get Vector Style
GET
/api/v1/styles/base.json?token=<token string>
Description
Returns the vector style JSON for use in Mapbox and other map renderers which support vector rendering.
This URL should be used as the base style.
Query Parameters
- token (Required): Vector Charts API token.
- styleId: Identifier for a custom style.
- theme: Set to
day,duskornightto change color schemes. - depthLimit: Sets the safety contour value in meters.
- depthUnits: Sets the units for depth soundings:
meters,feet, orfathomsare valid. - showEncBoundaries: Show an outline of the S-57 ENC chart cells. Defaults to
false. - showPlaceNames: Show names of landmarks & built-up areas. Defaults to
true. - showOverscale: Show an indication when the map is zoomed in too far. Defaults to
true. - showNoData: Show an indication where there is no ENC data. Defaults to
true. - glyphs: Override the glyphs (fonts) for the style with another URL. Must be a URL-encoded string.
- font: Override the font used for soundings and other textual elements.
Example Usage
in Mapbox GL JS:
const map = new mapboxgl.Map({
...
style: "https://api.vectorcharts.com/api/v1/styles/base.json?token=<token>&theme=day&depthLimit=10"
});
Example Request GET https://api.vectorcharts.com/api/v1/styles/base.json?token=299ce9bf4f244300a96f3926240f9c0d&theme=day&depthLimit=10 Example Response ... style json document ...