Skip to main content

Text

To add text, use the text parameter in this format:

text=textStyle|textCoord
  • textCoord: Coordinates for the text's anchor in lat, lon format.

  • textStyle: Customize the text with:

    ParameterDefaultDescription
    text(required)The text to render.
    color#000000BBStroke color of the text
    width1Stroke width of the text
    fill#000000Fill color of the text
    size12Font-size of the text
    fontArialFont-family of the text
    anchorstartDetermines the text anchor alignment.
    offsetX0Horizontal offset relative to the coordinate.
    offsetY0Vertical offset relative to the coordinate.

Example: Text "Hello World" with custom styling.

http://localhost:3000/api/staticmaps?width=600&height=600&text=text:Hello%20World|size:20|48.8566,2.3522

Text Example