Static map images

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — Static map images
Afrikaans Alemannisch aragonés asturianu azərbaycanca Bahasa Indonesia Bahasa Melayu Bân-lâm-gú Basa Jawa Baso Minangkabau bosanski brezhoneg català čeština dansk Deutsch eesti English español Esperanto estremeñu euskara français Frysk Gaeilge Gàidhlig galego Hausa hrvatski Igbo interlingua Interlingue isiXhosa isiZulu íslenska italiano Kiswahili Kreyòl ayisyen kréyòl gwadloupéyen Kurdî latviešu Lëtzebuergesch lietuvių magyar Malagasy Malti Nederlands Nedersaksies norsk bokmål norsk nynorsk occitan Oromoo oʻzbekcha/ўзбекча Plattdüütsch polski português português do Brasil română shqip slovenčina slovenščina Soomaaliga suomi svenska Tiếng Việt Türkçe Vahcuengh vèneto Wolof Yorùbá Zazaki српски / srpski беларуская български қазақша македонски монгол русский тоҷикӣ українська Ελληνικά Հայերեն ქართული नेपाली मराठी हिन्दी অসমীয়া বাংলা ਪੰਜਾਬੀ ગુજરાતી ଓଡ଼ିଆ தமிழ் తెలుగు ಕನ್ನಡ മലയാളം සිංහල ไทย မြန်မာဘာသာ ລາວ ភាសាខ្មែរ ⵜⴰⵎⴰⵣⵉⵖⵜ አማርኛ 한국어 日本語 中文(简体)‎ 吴语 粵語 中文(繁體)‎ ייִדיש עברית اردو العربية پښتو سنڌي فارسی ދިވެހިބަސް

Static maps images offer an easy way to embed maps on a webpage.

You simply use an <img /> tag (in pure HTML or via a CMS). Its src attribute forms a request, specifying the location of the map, the size of the image, the zoom level, the type of map, etc. When the webpage is displayed, the browser requests the image from the Static Maps script and it renders within the image location.

The Static Maps script can be hosted within your webspace or on an OSM (dev-)server.

Approaches

Comparison Matrix

Functionality OSM Static maps API v0.3 StaticMap staticMapLite Tyler
URL http://pafciu17.dev.openstreetmap.org - DISABLED http://ojw.dev.openstreetmap.org/StaticMap - Pending Disable http://staticmap.openstreetmap.de/ http://tyler-demo.herokuapp.com
Map types
  • mapnik
  • cycle
  • osma
  • mapnik
  • cycle
  • osma
  • skiing
  • maplint
  • cloudmade
  • mapnik
  • cycle
  • osma
  • piste
  • topo
  • Anything with a standard tile scheme
Image types gif, jpeg jpeg, png png png
Supported URL Parameters
Google API No lat/lon/zoom Yes lat/lon/zoom
OSM Permalink Yes Yes No Yes
Support of Markers
Markers Yes Yes Yes No
Multiple Markers Yes max. 10 Yes No
Custom Markers No URL based 3 styles No
GUI No Yes staticMapWizzard No
Support of Path / Vectors / Polygons / Overlays
Paths Yes Yes No No
Polygons Yes  max. 4 No No
Scale Bar Yes No No No

Meta

Things To Do

  • a more consistent approach (parameters) for interoperability
  • a good documentation for developers and skilled end-users
  • separation of actual tile rendering and interface/wizzard/tool scripts
  • more links throughout this wiki
  • list of some external use examples

People who are working on this

Proposal for unified Request Parameters

Besides varying in supported features each implementation has its own request parameter syntax. If you are planning to use one of those, read the documentation that comes with it.

Below you find a proposal for a more unified approach. Eventually some projects will adapt or implement compatibility modes.

OSM Scheme

  • lat
  • lon
  • zoom
  • layers
  • width
  • height


Google Static Maps API

  • center = latitude,longitude
  • zoom
  • size = width,height
  • format
  • maptype
  • markers
  • path
  • span
  • frame
  • h1
  • sensor

WMS Client getMap Request

  • version
  • request = getmap
  • service = mapnik, osma
  • layers
  • styles
  • srs = EPSG:3857 || EPSG:4326
  • bbox
  • width
  • height
  • format
  • bgcolor
  • transparent
  • exceptions

The schemes Google Static Maps API and WMS Client getMap Request are for compatibility reasons encouraging people the switch with little adjustments needed.