Static map images

From OpenStreetMap Wiki
(Redirected from Staticmaps)
Jump to: navigation, search
Available languages — Static map images
· Afrikaans · Alemannisch · aragonés · asturianu · Aymar aru · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · bamanankan · Bân-lâm-gú · Basa Jawa · Basa Sunda · Baso Minangkabau · bosanski · brezhoneg · català · čeština · corsu · 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î · Latina · latviešu · Lëtzebuergesch · lietuvių · Limburgs · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tagalog · Tiếng Việt · Türkçe · Türkmençe · Vahcuengh · vèneto · walon · Wolof · Yorùbá · Zazaki · isiZulu · српски / srpski · авар · Аҧсшәа · башҡортса · беларуская · български · қазақша · Кыргызча · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · भोजपुरी · मराठी · संस्कृतम् · हिन्दी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · བོད་ཡིག · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 中文(繁體)‎ · 吴语 · 粵語 · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް

Static maps images (have the potential to) offer an easy way to embed maps on a webpage.

The idea is for web site developers to simply use an <img /> tag (in pure HTML or via a CMS). Its src attribute specifies 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 map service and the map is displayed with no dynamic features, the same way as any other image.

Most of the options are open source, meaning you could host the service within your own webspace.

Approaches

  • Of course you can also grab a static map image by simply taking a screenshot; instructions for this vary between operating systems.
  • OSM's own Share panel's Image option also allows generating an image, but not as a permalinkable URL (for one-offs, and not for scripted use)

Comparison Matrix

Functionality OSM Static maps API v0.3 StaticMap staticMapLite Tyler [1]
Status/Reliability Gone Gone Looking unreliable
(recently re-hosted but only reluctantly)
Demo
(inherently unreliable)
URL http://pafciu17.dev.openstreetmap.org https://ojw.dev.openstreetmap.org/StaticMap 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

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.

It has been suggested that this page be translated into Portuguese as well as other pages in Category:Translate to Portuguese.
Você pode ajudar a traduzir? Por favor, considere a terminologia recomendada na referência.