ES:Imágenes de mapa estático
Si comprendes el artículo original en inglés, por favor, ayuda a completar esta traducción al español. Lee las instrucciones sobre cómo traducir este wiki.
Parece que nadie está trabajando en la traducción en este momento. Anímate y colabora en la tarea de traducción.
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)
- The following services are available:
- MapQuest/Open Static Maps API - sign up for API key
- Mapbox Static API and classic Static API - sign up for API key
- Tyler (github) - available as a "demo".
- StaticMapLite staticMapLite + staticMapWizzard - Available but hosted only reluctantly. Looking unreliable. Referrer usage requirement.
- staticmap from komoot
- staticmapservice - a configurable web service based on staticmap
- Printmaps Static Map Generator (free for normal resolution, premium for high resolution)
- A few services used to exist, but were taken offline. These along with other "tile stitching" options can still be run and used locally or re-hosted somewhere:
- StaticMap
- Bigmap
- Static Maps API
- Not a service, but it seems that you can find the (old) python script by searching the web for some keyword combination: http://modestmaps.com/examples-python-ws/ ws-compose and ws-pinwin
- (check above list and move items out of it if known not to cause load)
Comparison Matrix
Functionality | staticMapLite | Tyler [1] | |||
---|---|---|---|---|---|
Status/Reliability | Gone | Gone | Looking unreliable (recently re-hosted but only reluctantly) |
Demo (inherently unreliable) | |
URL | http://staticmap.openstreetmap.de/ | http://tyler-demo.herokuapp.com | |||
Map types |
|
|
|
| |
Image types | gif, jpeg | jpeg, png | png | png | |
Supported URL Parameters | |||||
Google API | no | lat/lon/zoom | sí | lat/lon/zoom | |
OSM Permalink | sí | sí | no | sí | |
Support of Markers | |||||
Markers | sí | sí | sí | no | |
Multiple Markers | sí | max. 10 | sí | no | |
Custom Markers | no | URL based | 3 styles | no | |
GUI | no | sí | staticMapWizzard | no | |
Support of Path / Vectors / Polygons / Overlays | |||||
Paths | sí | sí | no | no | |
Polygons | sí | max. 4 | no | no | |
Scale Bar | sí | 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
|
Google Static Maps API
|
WMS Client getMap Request |
The schemes Google Static Maps API and WMS Client getMap Request are for compatibility reasons encouraging people the switch with little adjustments needed.