Static Maps
Generate map images for email, cards, PDFs, social previews and server-rendered pages.
Get a shareable PNG from a URL without running browser JavaScript.
Create an image
The path specifies center, zoom and output size. Query parameters select a style, language, markers or a route path.
A second example, with a marker
@2x requests a double-density image for high-DPI screens; markers burns a pin into the image itself, since there is no JavaScript on the other end to add one.
Choose useful dimensions
Generate at the final aspect ratio to avoid cropped labels. Use a larger source image for high-density screens, then constrain its displayed CSS dimensions.
Serve images safely
For private or user-specific maps, request the image on your server and cache it with an appropriate lifetime. Do not place a secret key in public HTML or an email URL.