Static Maps API for map pictures and print maps

Create map images with markers for website, app, and print media

The Static Maps API allows you to create map images in JPG or PNG format. Once created, these images can be embedded on your website or printed on paper with no additional code.

With Geoapify Static Maps API, you can customize your map to view it in any style you want. Choose the colors and size for your markers, and add as many as you require.

This Live Demo illustrates a static map using a single location. You may also wish to try a different location, map style, or map view:

At the Static Maps Playground, you can try to generate maps with multiple markers. Check out the documentation page to learn about API options and map URL examples.

About Geoapify Static Maps

Multiple map markers

Multiple map markers

Add multiple map markers to your map. You can choose different types of marker icons. You can also change the icon’s shape, size, and color of the markers.

Marker icons are generated by the Map Markers API.

Can be printed in high-resolution

High-resolution maps

Static Maps API can be used to generate big-size and high-resolution map pictures. The API supports JPEG and PNG image formats.

You can get a map of up to 4096 x 4096 pixels with the standard API endpoints. We can also provide you with bigger sizes upon request.

No Javascript required for Static maps

No JavaScript or library required

No client library or coding is required to use Static Maps. You can generate a map URL dynamically and embed it as an image to your website or application.

Use the Static Maps Playground to get started quickly. The Playground also provides HTML and CSS examples to embed the map.

No extra costs for printed maps

Storing and printing at no extra costs

We use OpenStreetMap as a base for our maps, so you can cache, store and redistribute the generated maps at no extra cost.

However, it is necessary to properly credit OpenStreetMap and other contributors by providing appropriate attributions. Learn more about attributions on our documentation page >>

Static maps examples

Here are a few static map examples that demonstrate how to create different kinds of map views, prepare for print and add map markers.

Different map views

  • This API call generates a static map using map center and zoom to define map view:
https://maps.geoapify.com/v1/staticmap?style=osm-bright-smooth&width=800&height=600&center=lonlat:-74.004158,40.722619&zoom=12.1401&apiKey=YOUR_API_KEY
  • This API call retuns a static map image of the specified area:
https://maps.geoapify.com/v1/staticmap?style=osm-bright-smooth&width=800&height=600&area=rect:-74.04472450744129,40.69366453643252,-73.98100315654642,40.72408084086641&apiKey=YOUR_API_KEY

High-resolution maps

Geoapify Static Map API allows the creation of high-resolution map images. You can increase the resolution of the map up to 8 times with the scaleFactor parameter. So you can generate high-quality pictures for print media.

  • No scaleFactor specified:
https://maps.geoapify.com/v1/staticmap?style=toner&width=800&height=600&center=lonlat:-0.113019,51.503962&zoom=15.0858&apiKey=YOUR_API_KEY
  • scaleFactor = 2:
https://maps.geoapify.com/v1/staticmap?style=toner&scaleFactor=2&width=800&height=600&center=lonlat:-0.113019,51.503962&zoom=15.0858&apiKey=YOUR_API_KEY

By default, the maximal scale factor is 2. Bigger values are possible upon request. For more information on this, please email us.

Adding map markers

You can place multiple markers on the map with the markers parameter. You can also change the marker icons using our Map Marker Icon API:

https://maps.geoapify.com/v1/staticmap?style=positron&width=800&height=600&center=lonlat:13.405672,52.519409&zoom=11.7625&marker=lonlat:13.357885880465687,52.51379161179807;type:awesome;color:%23bb3f73;size:x-large;icon:paw|lonlat:13.435403556257342,52.52559069888832;type:material;color:%234c905a;icon:tree;icontype:awesome|lonlat:13.384108273311824,52.54648810294509;type:material;color:%234c905a;icon:tree;icontype:awesome|lonlat:13.468449875005945,52.48931087952414;type:material;color:%234c905a;icon:tree;icontype:awesome|lonlat:13.416138151658686,52.485695501631085;type:material;color:%234c905a;icon:tree;icontype:awesome|lonlat:13.376173654521267,52.496637126048455;type:material;color:%234c905a;icon:tree;icontype:awesome|lonlat:13.414388320414929,52.508181651118974;type:material;color:%234c905a;icon:tree;icontype:awesome&apiKey=YOUR_API_KEY

What's about static maps price?

Geoapify has a Freemium pricing model, so it's free to start and simple to scale as you grow. We calculate your usage in credits. The Free pricing plan includes 3000 credits/day.

Because the API uses a combination of map tiles and map icons inside, it's hard to get the exact cost in credits. However, here are a few principles that may help to roughly estimate the cost:

  • Estimate how many tiles you'll need to cover the map. You can get roughly the number of tiles needed by dividing map size to map tile size. As one tile is 256x256 px, the NUMBER_OF_TILES = MAP_WIDTH x MAP_HEIGHT / (256 * 256).
  • Count the NUMBER_OF_MARKERS you add to the map.

Then you can use the Credits Calculator to estimate how many credits you'll need.

Example 1. If you would like to request the 4096 x 4096 map, it will cost you 65 credits per request. You can generate up to 46 (~ 3000 / 65) such maps every day for Free.

Example 2. When you render a 1280 × 1024 map showing 100 places, it will cost you 106 credits per request.

Please be aware that the number of tiles will increase when you use the pitch parameter to create perspective images.

Static maps examples

Quick Start

Step 1. Get API Key

To start using Geoapify API, you need to register an account on MyProjects Geoapify, create a new project and get an API Key.

For more information about Geoapify projects and API keys, visit the Getting Started page.

Step 2. Generate Static Map URL

You can use the Static Map Playground to generate map URL.

Here is where you would configure the map view and add markers. The markers used on the map can be generated with the Marker Icon API.

Step 3. Embed as an image, HTML, or CSS

The Playground provides the map URL and the code to embed the map with HTML or CSS. Just copy & paste it!

FAQ

What is Static Map?

Static maps is an API that generates map pictures in JPG or PNG format. So you can add them to a website, application with no JavaScript (or other code), or print them. The API allows setting map view, map style, adding map markers.

What file formats can static maps be saved as?

Geoapify Static Maps API returns map pictures in JPG and PNG formats.

What is the pricing for the Static Maps API?

Static Maps API calls are calculated as a combination of Map Tile requests and Market Icon API requests required to visualize the map. Check our Pricing for Map Tiles. You can roughly estimate the number of tiles by dividing the area of the static map by the area of a map tile. For example, width x height / (256 x 256). Please note that when a pitch parameter is different than 0, the number of tiles can be bigger.

Can I cache static map images?

Yes, you can. But the map attribution should stay.

Can I generate a map image for the retina screen?

Yes, you need to provide scaleFactor=2 to the map URL. Read more about Static Map API parameters >>

What is the maximal map image size I can generate with Static Maps API?

The maximal map image width and height is 4096px. Contact us if you need bigger pictures.

Can I display routes and other geometries on the map?

Not at the moment, but the feature is coming soon.

Can I use the print version of the map in commercial products? How do you calculate the price?

Geoapify is a service provider, but we don't own the data. That means that you pay us for the map generation, but not for the map by itself. So you are free to use generated maps in commercial products without extra costs. However, note that you need to provide the appropriate attributions. Read more about required attributions on the documentation page.

World map

Ready to get started?

We have a Freemium pricing model. Start for free now and upgrade later!