Documentation

Static Map Images

When your don't need a map to be interactive, or just want a map image, you can use the Static Map API.

Pro Subscription Required

Building the URL

You can retrive an image from the api by building a url with the necessary information for your image. It's made up of the language, latitude, longitude, width, height, and an optional high dpi setting.

Standard Resolution URL

https://api.slpy.com/v1/static/{language code}/{zoom}/{latitude}/{longitude}/{Width x Height}.png?key={your_api_key}

High DPI URL

It is recommended to use the High DPI option to retain the images' sharpness on today's high dpi mobile and desktop displays. High DPI renders the image at 2x it's width and height so that when displayed it retains its clarity without looking squished or shrunk.

https://api.slpy.com/v1/static/{language code}/{zoom}/{latitude}/{longitude}/{Width x Height}@hdpi.png?key={your_api_key}
URL Part Description
language code This is a two character code that sets the language used on labels and roads for the map accross the planet. The default language is 'en' for English. You can use 'intl' for international labeling that uses the native language of the region being viewed. Available Lanugages:
  • intl - Language is in native language of viewed map area.
  • ar - Arabic العربية
  • bn - Bengali বাংলা
  • de - German Deutsch
  • en - English English
  • es - Spanish Español
  • fr - French Français
  • el - Greek ελληνικά
  • hi - Hindi हिन्दी, हिंदी
  • hu - Hungarian Magyar
  • id - Indonesian Bahasa Indonesia
  • it - Italian Italiano
  • ja - Japanese 日本語 (にほんご)
  • ko - Korean 한국어
  • nl - Dutch, Flemish Nederlands, Vlaams
  • pl - Polish Język Polski, Polszczyzna
  • pt - Portuguese Português
  • ru - Russian русский
  • sv - Swedish Svenska
  • tr - Turkish Türkçe
  • vi - Vietnamese Tiếng Việt
  • zh - Chinese 中文 (Zhōngwén), 汉语, 漢語
Zoom This is the zoom level, ranging from 0-20. 0 is the whole world, and 20 is house level.
Latitude The latitude of the center of the map you would like show.
Longitude The longitude of the center of the map you would like show.
Width x Height Width and Height in pixels of the image requested, seperated by x. Example '640x480'. High DPI option will return twice the requested size.
  • Standard DPI - Max resolution of 2048x2048.
  • High DPI - Max resolution of 1024x1024. Actual pixel size returned will be 2x size requested.
@hdpi (Optional) Renders the image at 2 times it's width and height at double the dpi.
Api Key This is the key you created for your site on your account page after you login to Slpy.

Examples

Here are some examples to help you get started.

Standard DPI

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>Hello World!</title>
  </head>
<body>
     <img src="https://api.slpy.com/v1/static/en/18/29.4257/-98.4861/640x480.png?key=your_api_key" style="width:640px;height:480px">
</body>
</html>

High DPI

The returned image will be an actual resolution of 1280x960, but we set the css style width and height to 640x480 to achieve the 2x dpi.

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>Hello World!</title>
  </head>
<body>
     <img src="https://api.slpy.com/v1/static/en/18/29.4257/-98.4861/[email protected]?key=your_api_key" style="width:640px;height:480px">
</body>
</html>

Next Steps

Enhance your search with Maps or Autocomplete

Autocomplete

  • Enhance your input
  • Rapid search cities or regions
  • Guide your search

Search & Geocoding

  • Add a search bar to your map.
  • Translate addresses to coordinates
  • Search for points of interest.