Atlas Static Maps

Atlas Static Maps is an API for generating map images with markers or other overlays

Base URL

The base URL of the static maps API is:

https://atlas.p3k.io/map/img

You can run your own instance of this for better performance.

Parameters

Parameters can be included in either the query string or in the POST body.

Markers

Built-In Marker Images

Authentication

To be able to use externally-referenced icons or tile URLs, you will need to configure API keys and provide a token in the request. This locks down the ability to fetch external resources to only trusted users of the system.

Create a file data/apikeys.txt and generate a random string with a tool of your choosing, and with one API key per line. Any value passed in the parameter token that matches the text in a line in this file will enable the request to use the restricted features that reference external URLs.

Paths

A path is specified as a list of longitude and latitudes, as well as optional properties to specify the weight and color of the path.

The coordinates of the path are the first value of the property, specified as a list of coordinates similar to GeoJSON.

Examples

Simple path with default color and weight.

path[]=[-122.651082,45.508543],[-122.653617,45.506468],[-122.654183,45.506756]

Specifying the color and weight of the path.

path[]=[-122.651082,45.508543],[-122.653617,45.506468],[-122.654183,45.506756];weight:6;color:0033ff

Examples

Simple map centered at a location

https://atlas.p3k.io/map/img?basemap=gray&width=400&height=240&zoom=14&latitude=45.5165&longitude=-122.6764

Map with a marker centered at an address

https://atlas.p3k.io/map/img?marker[]=location:920%20SW%203rd%20Ave,%20Portland,%20OR;icon:small-blue-cutout&basemap=gray&width=400&height=240&zoom=14