Query Parameters
All the static image endpoints additionally support the following query parameters:
Parameter | Description |
---|---|
path |
Path as comma-separated longitude/latitude pairs or in Google Encoded Polyline Format. Can be provided multiple times. Options: fill , stroke , width . |
latlng |
Indicates coordinates are in latitude,longitude order rather than the usual longitude,latitude for paths and markers. |
fill |
Default color for the fill of all paths (e.g., red , rgba(255,255,255,0.5) , #0000ff ). |
stroke |
Default color for the stroke of all paths. |
width |
Default width of the stroke for all paths. |
linecap |
Rendering style for the start and end points of all paths (see MDN). |
linejoin |
Rendering style for joining successive segments of all paths when the direction changes (see MDN). |
border |
Color of the optional border around all paths. |
borderwidth |
Width of the border (default 10% of stroke width) for all paths. |
marker |
Marker in format lng,lat|iconPath|option|option|... . Will be rendered with the bottom center at the provided location. lng,lat and iconPath are mandatory. Options: scale (scaling factor), offset (offset as pixel value [offsetX],[offsetY] ). Can be provided multiple times. |
padding |
Percentage padding for fitted endpoints (area-based and path autofit). |
maxzoom |
Maximum zoom level (only for auto endpoint where zoom level is calculated). |
format |
Image format for the static tileserver output. Supported formats: png , jpg , webp . |
scale |
Scaling factor for high-resolution images (e.g., 1x , 2x , 3x ). Useful for generating retina-quality images. |
Path Parameter
The path
parameter defines a set of one or more locations connected by a path to overlay on the map image. It takes a set of comma-separated longitude,latitude pairs or an encoded polyline using the Google Encoded Polyline Format.
Examples:
- Comma-separated coordinates: path=5.9,45.8|5.9,47.8|10.5,47.8|10.5,45.8|5.9,45.8
- Encoded polyline: path=enc:_p~iF~ps|U_ulLnnqC_mqNvxq
@`
If enc:
prefix is used, the rest of the path parameter is considered to be part of the encoded polyline string. Do not specify the coordinate pairs in this case.
The path can include styling options in the format (fill|stroke|width):value
before the coordinates or encoded polyline.
Examples:
- path=stroke:yellow|width:2|fill:green|5.9,45.8|5.9,47.8|10.5,47.8|10.5,45.8|5.9,45.8
- path=stroke:blue|width:1|fill:yellow|enc:_p~iF~ps|U_ulLnnqC_mqNvxq
@`
Multiple path
parameters can be provided to specify multiple paths.
Marker Parameter
The marker
parameter allows placing markers on the map at specific locations. It takes a set of lng,lat|iconPath|option|option|...
definitions.
lng,lat
specifies the location of the marker. The marker will be rendered with its bottom center at this location.iconPath
is either a URL to a marker image or a path to an image file relative to the configured icon directory on the server. Bothlng,lat
andiconPath
are mandatory.option
is in the formatname:value
. Supported options:scale
- Scaling factor for the marker image (e.g.,scale:0.5
scales the image to half its original size).offset
- Pixel offset for the marker from the specifiedlng,lat
in the format[offsetX],[offsetY]
(e.g.,offset:2,-4
moves the marker 2 pixels to the right and 4 pixels up).
Example: marker=5.9,45.8|marker-icon.png|scale:0.5|offset:2,-4
Multiple marker
parameters can be provided to specify multiple markers.