Open main menu

Discuss Template:OpenStreetMap here:


Links to OSM wikiEdit

I just created several maps for places that don't have an entry on the OSM wiki. Could this template be modified to have a place for permalinks, as well, for cases like this? --Padraic 14:18, 30 October 2007 (UTC)

See Category:OpenStreetMap maps of Ottawa to see what I mean. --Padraic 14:21, 30 October 2007 (UTC)
Yeah just noticing that on File:Soho - map 1.png. The Soho area is too small for us to create an OpenStreetMap wiki page about it.
A quick fix would be to change the text to say "You may find a page on the OpenStreetMap wiki called [link]" (so hedging our bets. It may or may not exist). I thought that would be a simple template change to make, so I tried to make the change here, but no. Too much voodoo magic in these templates. I have no idea how they work.
In any case a better fix might be to not bother linking the wiki at all. It would have to be a manual thing to indicate whether the an OpenStreetMap wiki page exists. Instead the 'source' could link to point at the right bounding box (or that idea should be elsewhere on the template).
-- Harry Wood (talk) 09:15, 20 October 2015 (UTC)


Could the template be improved so that a description can be added?? --Eusebius (talk) 15:52, 17 April 2009 (UTC

Link to OpenStreetMap coordinatesEdit

For my file File:Holborn-viaduct-map.svg I made several tweaks to the format used on this template.

In particular it would be good to link to the OpenStreetMap map with the coordinate parameters in the URL to take the user to the right place on the map. e.g. Trouble is passing lat, lon & zoom parameters into this template might make it quite complicated. But you can see what I mean on that file page.

-- Harry Wood (talk) 14:55, 8 June 2009 (UTC)

Crediting authorsEdit

I started a topic on COM:VP#Crediting authors of OpenStreetMap maps. Teofilo (talk) 21:08, 12 June 2009 (UTC)

Remove parent category?Edit

Hi, I noticed that including the OpenStreetMap template in the Souce Information assigns the parent category to a map file. The usual result is that maps get doubly categorized as OpenStreetMap maps of X-Country and as Category:OpenStreetMap maps, which is getting quite populated. Is this necessary? Can the double categorization be avoided once the by country category is assigned? Hoverfish (talk) 12:34, 7 April 2011 (UTC)

You can set the category parameter, which replaces the default Category:OpenStreetMap maps. So for example you can do something like {{OpenStreetMap ... |category=[[Category:OpenStreetMap maps of Uruguay]] }} and then it is included in the Uruguay category instead. I do wonder, though, if eventually we shouldn't make categorization explicit and remove it entirely from the template. - Htonl (talk) 15:28, 7 April 2011 (UTC)

Adding an own description?Edit

Hi there,

would it be possible to make the template accept a user-created description? This looks pretty ugly (imho). Greetings, --El Grafo (talk) 12:37, 16 May 2011 (UTC)

The few times I used this template I simply substed it ([{{subst:OpenStreetMap}}), saved, and edited then.
And: see above #Description. ;-) Cheers --Saibo (Δ) 01:12, 17 May 2011 (UTC)
Whoops, I didn't see that. Well, I tried it by myself now, seems to work. (If there is anything wrong with my edit, please don't hesitate to revert: That was basically my first attempt to edit a template.) --El Grafo (talk) 08:38, 17 May 2011 (UTC)
Looks fine (not tested). Cheers --Saibo (Δ) 22:29, 17 May 2011 (UTC)


Re-licensing bot currently removes CC-BY-SA 2.0 data from the map, so OSM will be ODbL-only very soon, maybe in a few days. Old uploads still will be CC-BY-SA & ODbL or CC-BY-SA-only, but newer uploads will be ODbL, so we need to decide what to do with this template -- e.g. to create new field "ccbysa" (defaulted to 0), and add it to all current inclusions, or something like that. --Trycatch (talk) 00:52, 21 July 2012 (UTC)

The ODbL allows "Produced Works" (like map images) to be distributed under any license; see openstreetmap:Open Data License FAQ#How does this affect Wikipedia and other projects that want to use our maps?. Once ODbL is in effect, CC-BY-SA-2.0 is no longer required. I suggest that we should add a "before-odbl" parameter to this template, and run a bot to set it to "true" on all images uploaded before the completion of the ODbL transition. Then for future uploads this template will only contain the required notice "Contains information from OpenStreetMap, which is made available here under the Open Database License (ODbL).", and the uploader will be free to choose any (Commons-acceptable) license for the map image itself. - Htonl (talk) 06:03, 21 July 2012 (UTC)
Hmm, you can use any license for Produced Works, BUT you need to attribute it in some specified way. How it's any different from any other attribution copyfree license, say, {{Attribution}}? It looks like it's still a license requirement, so you can't in fact use _any_ license.

"4.3. Notice for using output (Contents). Creating and Using a Produced Work does not require the notice in Section 4.2. However, if you Publicly Use a Produced Work, You must include a notice associated with the Produced Work reasonably calculated to make any Person that uses, views, accesses, interacts with, or is otherwise exposed to the Produced Work aware that Content was obtained from the Database, Derivative Database, or the Database as part of a Collective Database, and that it is available under this License."

Are these requirements even Wikipedia-compatible? Wikipedia doesn't allow in-article attribution, and the requirement that notices should be "reasonably calculated to make any Person [...] exposed to the Produced Work aware that Content was obtained from the Database..." obviously demands in-article attribution. Another problem I see that uploaders generally use not the raw data of the map, but some map tiles already created by somebody. Tiles are Produced Works already, so they can be distributed by the creator under any license they want (if it conforms the requirements from 4.3), including ODbL, something non-ODbL, or even something non-free. So I agree that the template should allow use of custom licenses, approach "one license fits all" doesn't work anymore for the maps from OSM. --Trycatch (talk) 11:13, 21 July 2012 (UTC)
I'm emailing OSM legal-talk with this and a couple of other questions. I'll let you know the results. - Htonl (talk) 15:35, 21 July 2012 (UTC)
That being said, whatever the result we'll still need to distinguish between pre-ODbL and post-ODbL OpenStreetMap images. I revise my earlier suggestion; rather than a parameter we should replace this template with a new template; we could call it something like {{OpenStreetMap pre ODbL}}. When the transition happens we could run a bot to replace all instances of this template with the new template, and then alter this template to reflect the new situations. - Htonl (talk) 16:23, 21 July 2012 (UTC)

ODbL now live on openstreetmap.orgEdit

I've updated the template to link to the ODbL if the parameter odbl=yes is specified. (Actually, it may be specified as anything except "no", "0" or an empty value.) The default can be changed to assume blank means yes when pre-ODbL files have been updated to say "no". According to their updated copyright page, map tiles from are still licensed under CC-BY-SA 2.0. This modification should be adequate for tiles taken from there. Do others think we still need to split the templates and allow for more specific licences? --Paul_012 (talk) 14:24, 13 September 2012 (UTC)

I've been thinking about this some more, and it seems to me that maybe the easiest approach is to leave this template behind for legacy use, and create a new {{ODbL OpenStreetMap}} template for newly-uploaded maps. This would always need to be accompanied by another template giving the license applying to the actual image in question, since ODbL only applies to the data. Then, for example, something created from map tiles would be tagged "{{Cc-by-sa-2.0}}{{ODbL OpenStreetMap}}", whereas for other maps other licenses could be substituted in place of cc-by-sa-2.0.
Incidentally I think the attribution question from above has been considered: the OSM "Legal FAQ" says that "This credit [to OpenStreetMap] needs to appear in a place reasonable to the medium you are utilising. In other words, you should expect to credit OpenStreetMap in the same way and with the same prominence as would be expected by any other map supplier." It seems to me that this indicates that attribution on the file page is acceptable. - Htonl (talk) 15:03, 13 September 2012 (UTC)
The template would look like this:
  Contains map data © OpenStreetMap contributors, made available under the terms of the Open Database License (ODbL).
Thoughts? - Htonl (talk) 15:34, 13 September 2012 (UTC)
Sounds like a good idea to me. --Paul_012 (talk) 16:30, 14 September 2012 (UTC)

OK, so {{ODbL OpenStreetMap}} now exists, and is automatically pulled in by this template when odbl=yes is set. I think it would be appropriate to add odbl=no to all the existing pre-changeover instances of this template, so that for future uploads if the parameter is not set it can default to showing the ODbL template. - Htonl (talk) 03:06, 16 September 2012 (UTC)

Another change with the introduction of ODbL is that OpenStreetMap images count as "produced works" with a certain amount of flexibility in their licensing. They can be licensed under different CC licenses or even "all rights reserved" (although all rights reserved images wouldn't be allowed on commons). They can't be Public Domain. ODbL requires that produced works are licensed with at least an attribution requirement (where that credit text credits OpenStreetMap). Anyway this template currently bundles one particular CC template, with no option to change or disable that. Guess we'd need to think about the existing uses before changing anything. For this image: File:Bengaluru Urban Area Map.png I just used the smaller Template:ODbL OpenStreetMap, and described that as the "map data license". -- Harry Wood (talk) 03:48, 29 January 2014 (UTC)
We could add a licence= parameter that lets people override the CC-BY-SA-2.0. In similar cases I've done the same as you, just tagging {{ODbL OpenStreetMap}} alongside the appropriate license tag. - Htonl (talk) 12:25, 29 January 2014 (UTC)

Usage documentationEdit

Just added some parameter descriptions to the documentation, hope they are correct.

But the following sentence in the usage seems incorrect to me, as it mentions a source parameter that in fact does not exist:

If source is not used the parameter name has to be used.

Should this one be corrected to:

If description is not used the parameter name has to be used ? -- Juergen (talk) 12:41, 6 January 2014 (UTC)

Link to map?Edit

Why is this template not linking to the map using template:location dec or similar? --Ysangkok (talk) 15:48, 4 March 2014 (UTC)

Yes. This seems missing, as I mentioned above #Link to OpenStreetMap coordinates -- Harry Wood (talk) 11:57, 4 March 2019 (UTC)

Translation to HungarianEdit


Hi! Can you supplement the template with Hungarian translation?

  1. (description field, first text) Ez a térkép {{#if: {{{location|}}}|(a(z) {{{location}}} helyről) }} az [[OpenStreetMap]] projekt adatainak felhasználásával készült, amelyet az OpenStreetMap közössége gyűjtött össze. <small>Ez a térkép hiányos lehet vagy tartalmazhat hibákat. Ne csak ezt használd a navigációhoz.</small>
  2. (description field, coordinate header) Keret koordinátái
  3. (source field) Nézd meg a képet az eredeti környezetében a(z) [{{urlencode:{{{name}}}}} {{{name}}} OpenStreetMap wikilapján]
  4. (date) (lásd a fájltörténetet)
  5. (author) OpenStreetMap közreműködők
  6. (permission, no odbl license) Az OpenStreetMap térképkockák és adatok a [[Creative Commons]] Nevezd meg! – Így add tovább! 2.0 (CC-BY-SA 2.0 licenc alatt érhetők el.
  7. (permission, odbl license) Az OpenStreetMap adatok az [ Open Database License] alatt érhetők el ([ részletek]). A térképkockák a [[Creative Commons]] Nevezd meg! – Így add tovább! 2.0 (CC-BY-SA 2.0) licenc alatt érhetők el. {{ODbL OpenStreetMap}}

I'll happy if you could insert it to the text (or it can be autotranslated). Thanks, --tacsipacsi (talk) 18:53, 7 April 2014 (UTC)

tacsipacsi: Unprotected, you should be able to apply the changes now. Thank you −ebraminiotalk 10:30, 4 July 2014 (UTC)

Relies on the Map Template?Edit

As far as I can see the OpenStreetMap Template do not relies on the Map template as this page tells me.

If this template does not relies on the Map template I would like to remove the mention of it here as it's messing up PyWikiBots generators. --Abbe98 (talk) 15:39, 19 April 2016 (UTC)

If you look at Template:OpenStreetMap/layout you can see that OpenStreetMap template was written as a special case of {{Map}}, however it seems like it does not allow you to use any additional {{Map}} fields. What do you mean when you say that it is "messing up PyWikiBots generators"? --Jarekt (talk) 17:03, 19 April 2016 (UTC)
Okey that explains it. I'm using the ReferringPageGenerator() function in pywikibot to get a generator of all pages with the Map Template. But currently it returns all pages using the Map or the OpenStreetMap template witch is a bit of a pain. I believe it's a result of the Map template being mentioned here.--Abbe98 (talk) 23:32, 19 April 2016 (UTC)
I think it returns the pages transcluding {{OpenStreetMap}} because they actually transclude {{Map}} at the end. If you want pages directly transcluding {{Map}}, you can try consulting the code of scripts/ as it depends on directly given template parameters so it should know somehow if the template is directly transcluded or through other templates. (I used this script, but I’m not familiar with its code.) --Tacsipacsi (talk) 07:07, 20 April 2016 (UTC)
Direct and indirect transclussion is not easy to tell apart and I do not know how PyWikiBots generators handle it. In AWB I would ask for pages {{Map}} and pages transcluding {{OpenStreetMap}} and subtract one from another. You can also use Catscan2 for list of files that transclude {{Map}} but does not transclude {{OpenStreetMap}} than save the list to some page or external file and use that instead of file generator. Other possibilities are using SQL in python and reading all the files that transclude {{Map}} and just skip them if file page contain string "OpenStreetMap". --Jarekt (talk) 12:03, 20 April 2016 (UTC)

It would probably make sense if this did make use of Template:map. I was just looking at the left,right,top,bottom parameters on here. I notice Template:map (besides having better documentation) has a more sophisticated approach for this via latitude & longitude parameters. I guess this template was originally copied from Map, and now they have diverged. It would make sense conceptually, since this template does all the same things as Template:map, but with OpenStreetMap credits set. -- Harry Wood (talk) 11:54, 4 March 2019 (UTC)

Support other map styles based on OSM dataEdit

There are many map styles, which are rendered based on OSM data. The license of those non-default styles varies from different versions of CC BY-SA to proprietary. Various images/screenshots of those styles have been uploaded to Commons. Due to the lack of a template, the attribution of OSM data plus map style is highly inconsistent. Examples:

Would it make sense to generalise this template in order to support other styles? A possible syntax would be {{OpenStreetMap|style={{OpenStreetMap/style/Stamen Toner}}}}, where {{OpenStreetMap/style/Stamen Toner}} defines a style name/description, a style URL, and a style license. – Simon04 (talk) 14:20, 28 February 2017 (UTC)

Template does not support Wikimaps WarperEdit

I added File:Hagengebirge.png (see but the template still shows the button. It needs to support parameter "warp status" from Template:Map. --тнояsтеn 10:09, 6 March 2017 (UTC)

Also Jonatan Svensson Glad (talk) 16:26, 1 April 2017 (UTC)
It seems to me it does support "warp_status" (with underscore) and has done since ~2014. The documentation has not been copied from Template:Map though (but seems to work the same).
I was just testing this out on a file picked at random File:Map Port of Spain.jpg. Hopefully I did that right
And I'll add your warp set-up to your image too. I believe this is correct: warp_status=external|warp_url=
You have to add that manually which is the final step in a pretty confusing process.
Although it's all very clever, warping seems like overkill given that the images are screenshots of maps which already exist as standard web maps mercator projected tiles 99% of the time, and standard OpenStreetMap style ~90% of the time. All we really need is a simple way to #Link to OpenStreetMap coordinates.
-- Harry Wood (talk) 13:09, 5 March 2019 (UTC)
Thanks, it works for my example File:Hagengebirge.png (where I do not see overkill because the map is quite different from standard OSM renderers). --тнояsтеn 14:39, 10 March 2019 (UTC)

other_versions parameterEdit

This parameter doesn't seem to render at all. See e.g. here. Can someone fix? Cherkash (talk) 08:50, 24 October 2017 (UTC)

You have to use other_versions with underscore. --тнояsтеn 09:07, 24 October 2017 (UTC)
@Thgoiter: Whitespace is the common default. Skripts such as User:Perhelion/simpleSVGcheck.js only work with whitespace not with underscore. If you prefer underscore, you might allow both, but whitespaces should be supported in any case.  — Johannes Kalliauer - Talk | Contributions 10:46, 30 June 2018 (UTC)
It seems that there is a valid reason, and I just understand too less.  — Johannes Kalliauer - Talk | Contributions 12:26, 30 June 2018 (UTC)
I didn't create the template nor name the parameters. Just explained, why it didn't work for Cherkash. Now both with and without underscore is possible. --тнояsтеn 12:44, 30 June 2018 (UTC)
Return to "OpenStreetMap" page.