Static Maps API

Easily show a map of anywhere in the world anywhere you can display an image. This API is completely free to use, with options to customise the location, size, zoom, and colour theme of the map as well as letting you place a custom marker.

This project is open source and the source code is available on GitHub. You can also check out my personal website if you want to see other things I have made :)

How to use the API

You can build a request to staticmap.samv.me/map with the parameters below to get a PNG map image. No API key is required.

Example request:
/map?markerLat=51.507&markerLon=-0.128&lat=50&lon=10&zoom=3

Parameters

width and height

Width and height of the map in pixels. Defaults to 640x480.

lon and lat

Longitude and latitude coordinates the map should be centred on. Defaults to 0 0.

zoom

Zoom level of the map from 1-22 (with 1 being the most zoomed out). Defaults to 1.

theme

Theme of the map, can be light, (default) dark, or satellite.

markerLon and markerLat

Longitude and latitude coordinates of the marker. If you exclude these options, there will be no marker on the map.

markerColor

Colour of the marker as a hex code (excluding the #). Defaults to ff5050.