Wikiocity Documentation

Everything you need to know to start using the Wikiocity API

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.


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.wikiocity.com/r/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 for most uses, as it will retain it's 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.wikiocity.com/r/static/{language code}/{zoom}/{latitude}/{longitude}/{Width x Height}@hdpi.png?key={your_api_key}
   		

Details:

  • 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.
  • Api Key - This is the key you created for your site on your account page after you login to Api.Wikiocity.

Examples

Here are some examples to help you get started.

Simple Map Image - 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.wikiocity.com/r/static/en/18/29.4257/-98.4861/640x480.png?key=your_api_key" style="width:640px;height:480px">
</body>
</html>

Simple Map Image - High 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.wikiocity.com/r/static/en/18/29.4257/-98.4861/[email protected]?key=your_api_key" style="width:640px;height:480px">
</body>
</html>

Markers

Coming Soon.