OpenStreetMap wordpress plugin

feedback & discussion

This site is used to

FIND THE NEW FORUM AT: wp-osm-plugin.hanblog.net/forum/forum-en/

292 Antworten auf „wp-osm-plugin-forum“

Hello Mika,

Thanks again for your answer. I would like to ask you what modifications you did so I can do it myself, and how to keep the POI eventhandler; although, I should rather save your time and wait for the next version of this great plugin.

Thanks again for your kind help,
Best, Micka

Hello Mika,

Thank you for your answer.

– I now tried to upload the kml (3 mb) and it worked. Nevertheless, displaying the map still slows down the website a lot. I tried using the kml URL given by this website (http://harrywood.co.uk/maps/examples/web-maps-lite/kml-displayer.php?url=http%3A%2F%2Fdl.dropbox.com%2Fu%2F19524621%2FVertlHorizon2014%25208.kml) and hoped to get similar results but it didn’t work. Is there anyway I could display the KML in the same easy and fast way with this plugin ?

– Ideally I would also like to keep the colors, especially of the markers because they are energy, environment / cultural / natural sites that we plan to visit on the way

the last code I tried.
[osm_map lat="50" long="18.5" zoom="3" width="600" height="450" gpx_file="http://tile.cloudmade.com/json/xml2json.php?callback=_getCloudMadeJson&url=http%3A%2F%2Fdl.dropbox.com%2Fu%2F19524621%2FVertlHorizon2014%25208.kml" map_border="thin solid black" control="scaleline,mouseposition" type="Mapnik"].

Thanks again for your precious help,



we will have a look on this layer and check if it’s covered in most regions. If not, you will have to add is as ext_map.


Dear Mika,

I hope my question will not appear misplaced or too simple.
I am preparing a world tour by bike and would like to have a map on my wordpress website that I am yet to build.

Here is what I would like to see: http://harrywood.co.uk/maps/examples/web-maps-lite/kml-displayer.php?url=http%3A%2F%2Fdl.dropbox.com%2Fu%2F19524621%2FVertlHorizon2014%25208.kml

I have map this map with all the markers and traces with google map, and exported the KML. In the plugging I have added the link to the GPX file (created from kml2gpx) and I can actually view the trace when I display the map in one post.

– My first problem is that the map is super slow (GPX is 35 mega) although there might be a way around as the kml displayer (first link) is super fast ?

– My second problem is that I cannot have the markers displayed (and I would like to keep their original colors). I have spent 24 hours on this already 🙁 but… I can’t see the solution. Is there any simple way to generate this marker_file.txt file from the KML ? (there is nearly 1000 markers I think).

Thanks in advance for you help and time,
I will be happy to send you a nice pic of this map once done !

Best regards,


I’m trying to put a single custom marker in my maps.
It does not work as the link to my image (the one I introduce in the form) is http://www.destinopueblosdelsur.com/wp-content/uploads/mucuposada_26x32.png

while if I click on the place of the image on the map (http://www.destinopueblosdelsur.com/los-servicios/alojamiento/mucuposada-las-rosas-en-acequias/) I get the following link:


showing that two links are combined.

Am I doing something wrong?

Hi Mika:

Thanks for your good job with this plugin.

I’m not a web developer or hacker, just a user. I’d like to add a new style to the OSM Map, the Landscape style by the very same creator of OpenCycle, Andy Allan. See http://thunderforest.com/landscape/ .

I find it more interesting for hiking/walking than Opencycle, especially for a region like mine which culminates at 5000 meter (15000 feet) high (Opencycle is made for England…).

I wonder if the best way is to add an Openlayer in your code or consider it as an „ext_map“. In the first case I can’t do it myself, in the second case I think I could follow your tutorial and get a good result.

Thanks to give me some orientation.

Compatibility with geolocation plugin?

I’m using the wordpress for android app togehter with the geolocation plugin (http://wordpress.org/extend/plugins/geolocation/).

The geolocation plugin stores the ccordinates in two custom fields:
– geo_latitude
– geo_longitude

While osm plugin expects the coordinates in one cutome field.
Before is start hacking in something who concatenates to two fields i wanted to ask if there is a nice or known solution to it?

First of all great Plugin ! Many thanks.

For the categories problem, is it or would it be possible to add multiple categories with somewhat like: import_osm_cat_incl_name=“catA, catA_1, catA_2″
so that parent and the postsubcategories can be shown?

Hi MiKa,
I dont know why but its not possible to center the OSM-Map in the Landscape-theme ( I tried it with plugin and
plugin but the maps stays always on the left side). Do I have to make a change somewhere else?
Thank you for your answer, I like your plugin because it’s very easy to handle (except of the centering)…
Take care

Thanks for the detailed feedback!
An update is planed for April and I will consider your lines!
BR, Michael

Hi Albert,

your map looks great, using most features of the pluing! And I like your feedback with the idea, to add your modifications to the standard. This way you will be able to update the plugin in future and others can use your extenstions. The most important issue is, that it has to be compatible with previous OSM plugin versions and no adaptions need to be done within in the code by the plugin user, but just via the OSM shortcode. Send me your code and I will like to add it.

Thanks and have a nice sunday,

Hi Mika,

Thank you very much for this great plugin. I modified the plugin to support posts with the same coordinates. In this case the post links are shown in the same pop-up. Are you interested in the code to add it to the official plugin? I also modified the spaces in the pop-up to look a little bit nicer.
You can see the modified plugin in action under this link:

Bye, Albrecht

An appropriate style needs to be defined for the layer. Styling is described here: http://docs.openlayers.org/library/feature_styling.html

In the file osm-openlayers.php the part that creates the layer for KML files is inside the addGmlLayer function. So there one could change the line that defines style as:

$Layer .= ‚ style: {strokeColor: „‚.$a_Colour.'“, strokeWidth: 5, strokeOpacity: 0.5, fillColor: „green“, fillOpacity: 0.3},‘;

in order to have a green colour and opacity 0.3 for example.

Hi Kai,

can you post both OSM shortcodes here (of the first and the second map) and post the version of the IE you are using.


Hi Mika,
first of all your plugin is really great.

I use it on http://www.umweltcacher.de/?page_id=48 in two different ways.

The first one shows content tagged with geodata works fine.

The second one works fine on Chrome and Firefox, but in the Internet Explorer the markers are not shown. The issue seems to be an invalid argument in OpenLayers.js.

Do you have an idea, what I can do?

Best Regards,

Hi Nico, this makes sense for plugins which are needed at every page. Most people have one page (eg impressum) and do not want to load the libraries if not needed. So performance was the reason for our desission. regards, MiKa


I found the problem: the Publicize module in Jetpack plugin
If I deactivate this specific plugin the map is shown.

Sorry, I thought I tried deactivating all plugins.

Hi Florian,

some other tests to check:

* do you see the map at the backend (settings => OSM)
* did you try to disable all other plugins
* did you try to change the WP-theme

All this is just to get the reason and fix it … of course it should cooperate with other plugins, themes …

BR, MiKa

Try to display just one (!) simple map like:
[osm_map lat="50" long="18.5" zoom="3" width="600" height="450" map_border="thin solid black" type="Mapnik"]

1. Try to load a simple map without any gpx or txt file.
2. If this works, add your personal file and post your osm shortcode – which does not work – here. (If you are adding a text file, keep in mind there has to be a linefeed at the very end)

Hi, I changed the page. No maps are shown.

Page content:

Simple Map:
[osm_map Lat="36.5665" Long="126.9779"]

Textfile Map:
[osm_map lat="50" long="18.5" zoom="3" width="600" height="450" map_border="thin solid black" marker_file="http://blog.bugie.de/wp-content/reise/map.txt" type="Mapnik"]


unfortunately the map is not shown and I get the following error in Chrome Dev Tools:
Uncaught ReferenceError: OpenLayers is not defined

URL: http://blog.bugie.de/reise/

I already tried to switch off other plugins, reinstalled the plugin, etc.

It would be great if you could help me with this.

Thanks and kind regards,

Hello Lars,

in fact I started already with the map center feature, but then the new OpenLayers version took all my attention … I know, this has to fixed.

The categories in WordPress are not comfortable for plugin developers … it will take some versions to get a clear concept for OSM plugin.

Just the software that was never written does not have any bugs 😉 Let me know your ideas, bugs and fixes …


Hello Klaus,

this has never been tested in detail and I assume the search loop has to be extented. The database scan takes a lot of performance at huge blogs … i will have a look at another version … and then decide.

BR, Michael

Hello Andrei,

please post your OSM shortcode and your customfield. I will try to reproduce it.

Gtx, MiKa

Hi, some experiences with the

[osm_map Lat="52.511624" Long="13.416367" zoom="11" width="600" height="600" type="Osmarender" marker_name="wpttemp-yellow.png" import="osm_l"]

function, which displays alle geo-tagged posts/pages on one map.

– if you use the „import_osm_cat_incl_name“ parameter, the osm-plugin isn’t able to work with posts, that a) belong to more than one category and b) isn’t working with posts in subcategories. In WordPress every post which belongs to category a also belongs to category b, when b is the parent category to a. OSM doesn’t seem to recognize this.
– the map-center params are ignored by OSM. For example this map is centered by Lat/Lon to the center of Berlin, but as you can see – OSM is far more north as it should be. http://weihnachtsmaerkte-in-berlin.de/karte/
As I see it, OSM tries to calculate its own center by the geotagged posts
– given these behaviour, how can I force OSM to work with subcategories or (if this is not possible) how do I include/exclude more than one category?
– can this center-„problem“ be fixed?

Anyone dealing with the same issues?
Netherless I love the plugins capability for template driven map-inserts. There are only some „bugs“, which doesn’t make it perfect :o)

Hi there,

I manage to get a map incuding all my posts. That is a great feature, thank you.
But as I understood the documentation, there is also the possiblity to show the (static) pages in a map.
My pages have the same meta-field, but do not show up.

Did I misunderstand something?


Apparently it’s not the html inside the custom field that breaks the map, but the new line character. I can’t hit enter on the custom field. For example, if I write these two lines in the custom field:

text 1
text 2

it will break the map, but if I write this single line

text 1text 2

it works just fine.
This isn’t too much of an inconvenient, as I don’t plan to write full websites in a custom field, but I think it should be documented.
I still have the problem with the ugly rectangled popup. I will post the solution here if I’ll find one.

I should have ended my last phrase with a question mark, sorry!

Also, for some reason using html in the osm_marker_text custom field breaks the whole map. Any idea?


I used a loop to display A LOT of gpx-files. It seems to not work anymore. Do you have a short code to display tracks in many gpx-files (1 files for 1 track). I have more than 250 gpx-files… 🙂

This was the only reason I didn’t use your plugin.

An idea?

Hello Hans,

of course you know the sentence „never change a running system“. Everyone working in SW-business knows, that most customers do not want any changes if the system is running. OpenStreetMap and OpenLayers is a very dynamic field with a lot of progress. The idea of the WordPress OSM plugin is not just to define a plugin and quit as soon as the requirements are fullfilled, but interact with the users and the underlaying technology.
But I am with you, changing interfaces in an incompatible way is not that „noble-minded“ 😉
Anyway, there are a few new features and I am going to use them in the plugin at the end of summer.

Hi Lars – this week an update of the OpenLayer library was done – which is loaded by the OSM plugin.
This broke some parts of the plugin. I hope I can fix it within this weekend and release a new version. I assume this wil fix your issue.



to be honest I do not want you do use an old version but fix this bug and make the fix available to others, too.
You will find a new file in your blog:
If you delete the attributes in this file step by step we will find the conflict with your wp-theme. If you make it empty it works like the old version.


The OSM-Code Map-Site is:

[osm_map Lat="51.868" long="16.44" zoom="6" width="100%" height="1000" type="" marker_name="wpttemp-green.png" marker_height="23" marker_width="23" import="osm_l"]

the code for the posts is nearly similar, in addition there is only the link for the track for display:

[osm_map lat="51.868" long="16.44" zoom="6" width="100%" height="800" marker_height="23" marker_width="23" marker_name="wpttemp-green.png" import="osm_l" gpx_file="http://b.mtbb.de/files/2012/05/PL-20120515.gpx" gpx_colour="black" control="scaleline,mouseposition" theme="dark" type="Mapnik"]


Hello Kirdneh,

may I ask you to post the osm shortcode tag here so I can try to reproduce it on a testpage. There are several paths which lead to this errormessage.

Hi Sven,

yes some parts changed. Can you try to deactivate the map just by adding a star like [*osm…] in front of the tag and see whether the post is shown correct again without the map?

Thanks for the plugin, that I’m using since a few weeks. I am runnig a WP-Site as a fotoblog, where I wanted to show the places of the fotos / posts on an OSM-Map and to show some gpx-tracks in posts.

It works well a long time, but since a few days there ist on all sites with only this message:

[OSM-Plugin-Error]:Lat or Lon is out of range or invalid (using defaultvalue)!

Before this error there was another problem with the plugin. All maps where centered on the same point not on the koordinates that I chose.

My main map you will find on this site:


Thanks kirdneh

Hello Ivo,

to your first question: I do not own a Mac but I will try what you mentioned next time at a friend. Please tell me more detailed which pin and link you are talking about. The best way is a link and explain what you do.

Second: Yes, this is discussed often and you will find some photos which are the peak of a mountain, a island without any city village, … So there is no general answere.

To get your address check this page: http://www.getlatlon.com – it’s a very cool service!

If you submit a photo you will get an e-mail that needs to be replied to ensure your e-mail address is valid. As long as this e-mail is not answered the photo is not published.

What you can do? Send as many photos of places you have taken 😉


Is it only me, or there is really no chance to click on the pin and open a link from Chrome/Safari/Opera on Mac OSX 10.7 Lion?
I really love the idea and would appreciate it a lot…
few more things: it is very complicate to submit a photo – it’s not always taken in the city/village and coordinates on google maps are not given in decimal system.
Is there anything i can do to fix it for my self or even the rest of potential users?
Thank you in advance!

Hi Lars,

I have never used these KML areas and I do not know any other site that uses my plugin this way. But I like it! There will be a new OSM plugin version within June and I will consider your request. The KML format will be added to the Media upload in the backend and I will have a look how to change the fillcolor or even make it transparent.


Okay, this is the URL of the article, where the kml function is used:

This is the shortcode and the download address for the kml file:

[osm_map lat="52.988" long="13.865" zoom="11" width="600" height="450" kml_file="http://www.reiseziel-uckermark.de/wp-content/uploads/grumsin.kml" kml_colour="red" map_border="thin solid green" control="scaleline" type="Mapnik"]

Thanks again for providing this plugin.

Hi Lars,

to be honest: I have never worked with the feature of displaying areas with a KML files. If you want me to consider this in the next plugin version:

* post the OSM shortcode you are using
* post a link to the KML files that represents your area

I will make tests and if needed add an argument to change the fillcolour.

Thx for using OpenStreetMap ‚:-)

I am visualizing a KML file on a map and want to know,

how I can change the fill-colour of the polygon (the KML represents an area)?

kml_color only changes the outline color.

Thanks and keep the plugin going up.

Hi Jan,

if you modified the php-file already to get the marker of all posts its just a small step to get the links to each post, too.

Just post the modification in the file here and I will some comments and add it also into the next version. So you will be able to update your plugin.


Hello MiKa,

how it is possible to add a map with markers of all posts to a wordpress theme? OSM_displayOpenStreetMapExt displays just marker of a current post.

In a post/page it is done with
[osm_map zoom="10" marker_name="wpttemp-green.png" import="osm_l"]
, but I want to have such a map defined in the template as a part of the website – as a kind of navigation menu…

I tried to make a new function in osm.php based on OSM_displayOpenStreetMapExt with ‚marker_all_posts’=> ‚y‘
– so I was able to insert markers for all posts (like in import=“osm“) but I don’t know how to display also the link to the post…

Is there maybe any clean and easy solution?


Hi Roland,

there is no way to influence the default settings. If you have to add a lot of maps to your blog ad once I can help you to modify the source, but it will be disabled as soon as you update the plugin to the next version.


Thanks for the great plugin.

I have som questions:

How can I get a default marker?
How can I get dark as default theme?
Can I have a default zoom level to for example Eindhoven, and surroundings in the settings panel, now I see the world?

It worked like this:

var lonlat2 = new OpenLayers.LonLat(-9.16994,38.73227).transform(map.displayProjection, map.projection);

But I expected the Lat and Long set in the shortcode to be the fixed center position. I noticed that map.setCenter() is set right in the beginning of the JS code you’re using. Shouldn’t it be after all the markes have been set?

Anyway: wonderful plugin!

Viele Gr

thanks for the hint! I checked everything with Firebug and found out that

.post img { max-width: … }

caused the error. So this issue is solved now.

But one more question: I put this shortcode in one of my pages:

[osm_map Lat="38.707033" Long="-9.136621" zoom="11" width="620" height="414" marker_name="wpttemp-red.png" import="osm_l"]

Even though I put Lat and Long values, the map doesn’t center on the inner city of Lisbon, but centers to a new position every time I add a post with geo coordinates. Can this be solved using shortcode attributes or do I have to add a sort , something like:

map.setCenter(new OpenLayers.LonLat(…);



Hello Johannes,

this seems to be related to the WordPress theme your are using. With Firefox and Firebug it can be analyzed and fixed in the theme or plugin


Hi boyska,

feel free to modify and use the OSM-plugin as long as you cover the GPL license. Up to know there was no need/request to route the OSM requests like this. If you implement it in a generic way and send me the code, I will put it into the standard so yo can benefit also from following OSM plugin updates.

gtx, MiKa

Hello, I’m interested in your plugin, but I want to do a security proxy, so that the user does not send his requests to openstreetmap.org, but to mysite.com instead.
It seems that this is quite easy to do: just make some define() apply_filter()able so that I can replace those values.
the defines to be filtered should be just URL_INDEX and Osm_OSM_LibraryLocation.
The changes to the code will be minimal.

Are you willing to accept such a patch?

PS: I still need to do this and check if everything is really working, but I’m asking in advance 🙂

Hi MiKa,

found the reason for the gap:

Theme „Basically“ has
#content img,
#content .wp-caption,
.commentlist img {
margin: 0;
max-width: 97.5%;
in its style.css, which (at least firebug says so) overrides the settings in osm.css.

I added
#content .olMapViewport img {
max-width: none;
in style.css, which may not be a clean solution, but works for me

Thanks for the hint to use firebug.

Hi J,

with the current version I do not know any solution. There will be another release in March – I will have a look on this issue.



And do you have a solution to include posts whose are belonging to many categories ? Even if it is quick & dirty, it would very help me.

Best regards,

Hi John,

when I was implementing this feature – to include or exclude tagged post – I was disappointed by the performance since these database requests consume a lot of time. At Fotomobil.at there are more than 1.000 posts so I stopped investing effort into this feature. It’s just implemented for post that belong to only one category, others are added or not.
Gtx, MiKa

Up to now this feature (include and exclude) is just implemented and tested with 1:n relationship – so a post belongs just to one category. To be honest I did not make tests with subcategeries.


I do not know any effective way to encrypt your source page. I did not spend time on this issue up to now.


I am not sure what you mean, if you want to make the tracks transparent then it’s:No. You can just change the colour of the tracks.


Is this use-case knowed, or am i doing it bad:
I have a website where i’m using WordPress OSM Plugin (very great work ! – Congratulations). When i’m using osm_map code, i can, like documentation is explaining, filter by categorie to exclude, or include one.

But i have this issue: if i include „foo“ categorie and i have 3 mains posts:
lol1 belongs only to foo categorie
lol2 belongs to „foo“ and „bar“ categorie
lol3 belonge only to „foo“ categorie.

lol1 and lol3 will be included, but WordPress OSM plugin seems to fail to include lol2 cause it belongs to multiple categories.

Am i doing it bad, or is the plugin concepted like that ?

Best regards,


with this code : [osm_map Lat="47" Long="0" zoom="1" width="505" height="350" type="Osmarender" marker_name="wpttemp-yellow.png" import="osm" import_osm_cat_incl_name="austria"]

Is it possible to include a category and subcategories? Or two distinct category ?


Hi Mika,
I have two questions:
1 /
I installed the plugin osm in wordpress version 3.3.1 but when I edit a post, I did not view the custom fields.
Everything is ok with version 3.0.
Have you a return of other problems like this?

2 /
on my version 3.0 everything is ok. However when editing the source code of the page with a map, we get the gps data readable by all.
Is there a way to encrypt these gps data, with md5 for example ?




the OSM map is very colorful and the tracks/lines usually have similar colors.

Is there a way to use a opacity (for the map)?


Hi Torsten,

a screenshot ist not that helpful. You can analyze the problem with Firefox and the Firebug plugin. This way you can online change the style. Or post a link to the page with this problem.

If you do any modifications in the plugin you should consider it is lost as soon you make an update. So, sharing the fix will ensure you get all future improvements without loosing your own.

gtx, MiKa

Hi MiKa,

read something in the comments about the vertical white bars in the map display – and that this issue should be fixed.

Although I’m using the latest (1.2.1) version of the OSM plugin, I still have these bars. WordPress is WordPress 3.3.1, and I’m using the theme „Basically“ 1.1.0. Plugin code is
[osm_map lat="52.438" long="13.58" zoom="14" width="619" height="450" marker="52.429,13.583" marker_name="wpttemp-red.png" map_border="thin solid black" control="scaleline" theme="dark" type="Mapnik"]

I already tried changing the css for the map display, with no luck (mainly because I don’t know much about the structure of the elements within the map display).

With something like
entry .olMapViewport img, .entry-content img, .widget img {
border: 1px solid black !important;
margin: 5px !important;
padding: 5px !important;
I’m able to increase the margins/borders of the image „cells“, but setting margin+padding to „0“ never deletes the white gap. There seems to be something in between.

Do you need a screenshot? Do you have any idea, which elements could cause the gap?


All right, thanks! So that’s what „“ was trying to tell me, I guess?
(I did not notice this one until five minutes ago, as my focus was limited to metas and HTTP-response headers 😉

Hi Tom,

in the file Osm.php line 276 you will finde:
// list($lat, $lon) = explode(‚,‘, $PostLatLon); produced warning on some blogs ToDo
replace it with:
list($lat, $lon) = explode(‚,‘, $PostLatLon);
This will generate your html-meta tags again. It was commented since some systems got warnings there. It will be fixed within next releases.

since the last update -two days ago, IIRC- no location metas seem to be generated anymore. Maps are still getting displayed, no problem there – but no geotags. There’s no error message in the logs, the custom fields are still there, just the geotags have vanished from the meta section. They definitely were there before and since there is no error message anywhere, I have not changed themes or anything else, so I am quite clueless what might be the problem.
Can anyone reproduce, at least?

=== OSM-PLUGIN V 1.2 release ====
FIX: Warning: explode() expects parameter 2 … on line 272
NEW: use private theme for cntrols in /wp-content/uploads/osm/theme/
NEW: language: Japan

Sorry but i haven’t see your email (maybe caught by gmail antispam?), but i’ve tryied the last version that you have just released and it works good
thank you
(when the website will be released to the public i will put the link on the wiki example)

Since I can not reproduce this bug on my system I ask anyone who can reproduce this bug on the sytem to send me an e-mail so we can fix it. Just posting here a message anonymously (!) is useless in this case.

Hello David,

I do believe there are bugs which can disappear. Unfurtunatelly this kind of bug have got a very uncomfortable second property: They can also appear as soon as they seamed to be disappeared 😉
Thx for your info – I have sent an e-mail to you with a newer version which might solve the problem – before you posted this text. Did you get it and try it?

WP 3.1.1 on php 5.2.17 ( http://webx287.aruba.it/env.php ).
I’m using 4 shortcodes on 4 pages, like this:

[osm_map lat="44.218" long="12.041" zoom="18" width="600" height="450" marker="44.21821,12.04109" marker_name="camping.png" theme="ol" type="Mapnik"]

The strange thing is that that error „osm.php on line 272“ disappear after some minutes, and i think that i haven’t do nothing

Hello Sykane,

thanks a lot for the translation – it will be for sure part of the next release!!


Hi Davide,

thx for your quick reply! I could not reproduce it – may I ask you for this information:
* which WP and PHP version do you use?
* which OSM shortcode to you use

Can you post or mail the link to the page with this message.

Thx, MiKa

I’ve just upgraded to 1.1.1, now on the top of the website i’m getting this text:

Warning: explode() expects parameter 2 to be string, array given in /web/htdocs/www.podistiavisforli.it/home/wp-content/plugins/osm/osm.php on line 272

how can i solve this problem?
the osm maps are sill working good.


Is it possible to use a dynamic KML file with this plugin? I have linked my Woopra account to Google Earth which successfully displays markers for each of my members accessing my site in real time. I have saved the KML and loaded it to my server. Is it possible to use this KML file with your plugin?

Thank you!


Kann mir jemand helfen. Ich versuche im OSM-Plugin ein gpx file dazustellen. lade den gpx file in mein wordpress upload bereich doch der erzeugte code zeigt zwar die Seite und den Marker, aber nicht den track [osm_map lat="22.664" long="-78.443" zoom="6" width="600" height="450" marker="20.181,-77.323" marker_name="bicycling.png" gpx_file="http://www.ralfkropp.de/radreisen/wordpress/wp-content/uploads/2012/01/Baracoa-Campismo.gpx" gpx_colour="blue" type="Google Hybrid"]

Hallo Jan,

habe den shortcode getestet und er hat bei mir funktioniert – Dein Textfile habe ich kopiert. Evtl solltest Du im Backend beim Artikelschreiben einmal auf die HTML Ansicht gehen um sicherzustellen da

Hallo Mika,

ich versuche mich gerade einmal wieder mit dem PlugIn – zwischenzeitlich Version 1.0.

Ich habe folgenden Source zusammengeklickt
[osm_map lat="54.428" long="12.776" zoom="13" width="600" height="450" marker_file="http://www.tappenbeck.net/wordpress/wp-content/uploads/2012/01/stones_darss.txt" control="scaleline" type="Mapnik"]

Es wird aber nur die Karte angezeigt ! Die Dateien sind

Hi Henrich,

thanks for your comment. Answeres are:

add 1.) There is no way to change the color from the controls since this is loaded from the OSM project.

add 2.) As soon as there is WP 3.3 released there will be another OSM plugin version, I will have a look whether I there is time to implement something to change the control.

add 3.) This wont be part of the OSM plugin, I am waiting for the next version of Gpx2Chart plugin.

add 4.) Is already implemented, have a look at:the argument: gpx_file_list to add several gpx files.


great work!

My wishes and questions in short:

1. change icon color (pointers, zoombar …)
2. replace worldbutton with a zoombar (level stepping)
3. adding a levelcurve when using GPX
4. use two or more gpx tracks in one map, selectable like other maptypes

Thank you verry much for your good work.
greetings Henrich

Hi Max,

at least the autcenter and autozoom function is planned for one of the next releases, like
[osm_map_gpx file=“www.domain.com/upload/text.gpx“ width=“400″ height=“300″].
So you need not to use the shortcodegenerator anymore.



just tested the plugin and I want to join this wishlist, cos I’m using the XML Google Maps Plugin too with the option of displaying the OSM.

But I would change to this OSM plugin if it could autogenerate the map from a gpx link in a post, inlcuding auto zoom and auto center.

I’ve tested the OSM plugin with an existing gpx and it shows only the track but no waypoints, maybe I didn’t understand how to show both in the map.

Thanks for this OSM plugin.

Hi Mathias,

this feature and custom post types are on my list for several months but they did not get into the reales yet. So, unfortunatelly: No. There are some tiny fixes planned for the next release as soon as WP 3.3 is released. But I hope will find some time to add it these feature in OSM V1.2 later on.

Thx for choosing OpenStreetMap 😉


Is it possible to get pins from a selected custom taxonomy instead of from a category like in this code below:

[osm_map Lat="47" Long="0" zoom="1" width="505" height="350" type="Osmarender" marker_name="wpttemp-yellow.png" import="osm" import_osm_cat_incl_name="austria"]

Let’s say the taxonomy is „austria“ instead.

Great plugin by the way!


I’ve been messing around with this and I am also having a issue getting makers to show up. I’m using this as my examples:

Short code (removed the brackets for here):

osm_map lat=“49.81″ long=“8.71″ zoom=“13″ width=“600″ height=“400″ marker_file=“http://www.w5edf.com/wp-content/uploads/2011/test2.txt“

With the valid marker_file. Using the marker file from this site as my test. The map shows up, but it will not display markers.

Hi Mike,

ich habe die ersten Versuche unternommen und dazu drei Fragen:

* Wieso wird der Marker in dem Wald – rechts von Zingst – nicht angezeigt? URL zum Bild ist verf

Hi Mika

Many thanks. It’s the Twentyeleven theme that causes the main problem – I switched to ‚Tweaker4′ and the bands across the map have gone!

Looking closer, the white background on the marker hyperlinks just ends very close to the right-hand edge. When the link is wrapped onto two lines there is a margin at the right.

Is there any way to put a map on a page and have it display latitude/longitude when clicked? I want my authors to add lat/long for every post and it would be better if they had the facility on-site rather than using an external website. The alternative would be to add the map when composing every post rather than in ’settings‘ as you have mentioned elsewhere.

Thanks again, brilliant work! 🙂


Hi Sam,

your first point is not possible and not planned up to now – some deeper changes are needed to support this.

I did not know about the second point up to now. The plugin uses a library to display kml files – can you post a sample for such a placemark you are using?

BR, MiKa

Hi Paul,

there are several involved parts in showing a map (plugin itself, libraries used by the plugin, WP, WP-Theme, …).
To get bugs fixed, providing information as detailled as possible is helpfull – at least a link to the page with the problem. Someteimes there is even a need to try Beta versions on your own blog …


Thanks for a great plug-in…so much easier to understand and use for a WordPress novice than the other map plug-ins.

Two minor problems I’ve noticed though:

1 My maps have vertical white bands as though the map is made from 3 or 4 strips.

2 When I click a marker, the link text is wider than the white background.

Is there a way to fix either of these?

Best regards


Thanks for the plugin, it’s great!

I’ve got two questions:

1. Can I place a marker which directly behaves as a href link? (I mean if I click on the marker it doesn’t show a popup with a link which I can click on, but IT IS the link itself.)

2. When I load a kml file it doesn’t show the placemarks, only routes and polygons. Would it be possible to also take placemarks into account please?


Hi Hurshal,

the feature to add markers by comment has been disabled since there were several difficulties which were not solved. So you can only add info to your map in the backend when you are logged in.

I’ve installed OSM plugin, but i don’t understand how the visitor can add marker from comments. Anyone can help me?

Thank so much for your promptly reply, it’s working!

Now I’ve pushed a bit more on the .dat file adding a link to a larger image, this is just the first row of the file:
lat lon title description icon iconSize iconOffset
44.189263 7.694555 Rifugio Garelli dall’alto http://lanterna.net84.net/wp-content/plugins/osm/icons/wpttemp-green.png 20,20 0,-20

Just one more question: the icon marker in my site show some black around, yours are transparent, do you know why?


I’m an OSM addicted and I enjoy your plugin a lot, unfortunatly I’ve a problem with my free host service (webhost.com): they don’t allow reading .txt files, so I can’t use all the features that involve marker_file.
I asked to the help forum and they confirmed that is a limitation by rule.
I’ve tried to upload the same file with a .dat extension and this is readable, but to put a .dat extension in the osm_code doesn’t work.
Do you have a piece of advice for me?

Many thanks

If you are using the sample txt-file you have to copy it to your domain.

The OSM plugin itself does not consider the mainmap zoomlevel when the overviewmap is set. I will do some tests at the next release to check if the openlayers libraries are changing this level.

You find all informations about your second question here. The sample for the popup argument is here.
For any reason the sample used the wrong argument, thanks for this hint – it’s corrected now and you can see the sample!

Hi, it is a very nice plugin.

I have two questions.

1. I have trouble with the zoomlevel of the overviewmap. I want a overviewmap which is zoomed out, like ov_map=“0″ or zoomlvel 1 or 2, but the zoomlevel seems to be always just a few levels under the zoomlevel of the mainmap. Feature or bug?

2. For single posts the „custom field to add popup marker text“ procedure works fine, but is it possible to get popups for the „mark all locations of your posts/pages which are related to a geo location“ map? And when yes, how?

So long, thanks a lot and keep up the good work.


And I tried the sample and also the markers are not shown.

[osm_map Lat="36.315" Long="128.101" width="600" height="450" marker_file="http://www.faktor.cc/Fotomobil/wp-content/uploads/Korea_Marker_2009_V1.txt"]


I’ve also problems to use the OSM Marker_file to show markers.

I used this string [osm_map lat="54.13" long="9.35" zoom="9" width="600" height="450" marker_file="http://www.wetznet-gallery.com/nok/unterkuenfte.txt"]
but there is nothing displayed.

I tried also the html view and I treied to add a CR/LF at the end of the txt file nothing helps.

Unfortunately, not:

I am afraid this special WP-theme is the problem. The admin already had a lot to do to get the osm-plugin running in the first place.

Similiar problem do I have with displaying a gpx track. Look here:
The shortcode:
[osm_map lat="61.119" long="14.617" zoom="14" width="600" height="450" marker="61.118,14.619" marker_name="wpttemp-yellow.png" gpx_file="http://www.destinationorsa.se/gpx/3000steg.gpx" gpx_colour="red" control="scaleline" type="Mapnik"]

Well, I suppose the problem is in the special wp-theme of this installation.
I give up.

The shortcode is
[osm_map lat="61.154" long="14.687" zoom="11" width="600" height="450" markerfile="http://destinationorsa.se/wp-content/uploads/2011/06/Midsommar_Orsa_2011.txt" map_border="thin solid red" control="scaleline" type="Mapnik"]

and it looks the same in the html view and the plain text view

Hi Christoph,

looking at your site I could not see anything that’s loading the txt file. Did you copy/paste the string from the plugin-settings page as plaintext? Do be sure you can change the editor-view of the post into HTML-view and add the shortcode this way.
Or feel free to post your shortcode here to get more details …

Thanks again Mika.

I will keep an eye on when the new version of WordPress and the OSM plugin is out an then give it a go again!


Hi Jens,

alls is fine at your screenshot and it’s not obvoius why this mechanism does not work on your page. Without internal information it’s quite hard to find the reason. But there will be another OSM plugin version as soon as WP 3.2 ist published and I will add some mechanism to analyze such difficulties in the backend of your page.

Hi Jens,

this is OK, can you send a screenshot of:

two customfield settings in yor backend:
* settings => OSM (you have to define the the customfield overthere)
* post (the customfield you added there)

Hi Mika

Thanks a lot for you quick answer

Herer is the shortcode I amusing: [osm_map lat=“49.375″ long=“11.029″ zoom=“4″ width=“550″ height=“450″ type=“Osmarender“ marker_name=“wpttemp-yellow.png“ import=“osm_l

Hi uname,

when you want to zoom to a specific place / street you have to press shift button and define a zoomwindow in the map by pressing the left mouse button and move the mouse. The map will automatically zoom to this window.
The mousewheel just changes the zoomlevel and does not consider mouseposition.


when i zoom with the mousewheel in or out of the map that is displayed in my wp-blog it don’t work like it should. the zoom point is not where the mousepointer is. so when you would like to zoom so street-x you land in street-y that is in the east of street-x; then when you zoom out to search street-x you land in an other city that is even more easterly.

do anybody know what this could be?

my code:

[osm_map control="scaleline" height="480" width="640" lat="xx.xxxxxx" long="xx.xxxxxx" zoom="16" gpx_file="http://www.example.com/file.gpx"]

Hi Jens,

there is no known issue with Atahualpa. And even the active Geolocation plugin should not effect the OSM plugin. Pls post the OSM shortcode you are using here or temp. on the site of the map. Did you set the name of the customfield in the osm settings page and press submit?


Hi Mika

I am trying to use your plugin for mapping my posts in a new website I am setting up. Map is shown fine, but I have trouble to get the marker from the posts on the map.

I am using WordPress 3.1.2. and Atahualpa 3.4.9

I have tried to deactivate the Geolocation plugin without any luck.

Any suggestions?



Unfortunately, I am not the web developer of the site. That’s why, I cannot change themes or other plug-ins. And the theme is not a standard theme but self written. I was hoping to get a hint for the problem, so that I could tell the web developer more precisely, what he should change.
There are 13 plug-ins active: Adminimize, Advanced Excerpt, Category Description Editor, Contact Form 7, HTML in category descriptions, More Fiels, My Category Order, OSM, postMash (Filter), Thumbnail for excerpts, WordPress e-Cards, WP no category base, WP Super Cache

Maybe somebody has an idea what causes the trouble.
(The plug-in works perfect for me on another WP installation with another theme)

Hi Christoph,

make a stab at using another WP-theme. If it is still the same behaviour disable other WP-plugins step-by-step.
As soon as you know whether it is related to the theme or another plugin the Firebug is a good tool to analyse details at runtime.

Gtx, MiKa

Addition; css does not seem to be the problem; I tried the page with a different (working) style sheet and it did not work as well. In the backend of wordpress (at the plugin settings page) there is a map visible.

I am using the OSM-Plugin in WordPress. Example page is

The shortcode is [osm_map lat="61.105" long="14.634"] – to keep it simple. When looking at the sourcecode of the page produced I can see the code for the map, but no map is displayed (checked with different browsers). I assume it is a css problem and no real problem of the plugin. But maybe somebody could give me a hint.



Hi Marc,

thanks for your hint! It will be considered it in the next plugin-version.


I’m using your famous plugin for my website to display speed cameras worldwide, and it rocks!

Just a small correction for the next version, the php command split is deprecated since php 5.3.0, so you’d better use the explode one. It does the same as your are only searching for separator (‚,‘).


Hi Rey C,

currently only posts are checked, but custom post types and pages are planned for further OSM plugin versions.

Gtx, MiKa

I have a web site for a club and would like to show members localization on a map. Each member has a personal page with geo meta tags.

I try publishing a map with this code :
[osm_map Lat="49.2" Long="8.6" zoom="9" width="640" height="400" type="Osmarender" marker_name="wpttemp-yellow.png" import="osm_l"]

Unfortunately It only show geotagged post, but I am not able to show geotagged page?

It is possible to use „import_osm_cat_incl_name“ for pages ?

Thx Cyril

Hi ipofanes,

doing some tests with XML parsing within the plugin I found some difficulties and chose the simple way, just using the filename without extension. You can see a running sample on HanBlog.net.

caution, works for me. I mean it.

I think it only works for local files, and you require full URL which I think the getGPX function wouldn’t work with.

@ ipofanes:

Well done!
Thanks for sharing this information here, will be part of next OSM-plugin version so you need not to keep your private version but update the plugin freely 🙂


I have helped myself with point 3. I added the following lines in the Osm block:

function getGPXName($filepath)
$doc = new DOMDocument();
$xml = file_get_contents($filepath);
$metadata = $doc->getElementsByTagName("metadata")->item(0);
return $metadata->getElementsByTagName("name")->item(0)->nodeValue;

and replaced the line

$GpxName = 'GPX_LIST_'.$x;


$GpxName = Osm::getGPXName($GpxFileListArray[$x]);
if ($GpxName == "") $GpxName = 'GPX_LIST_'.$x;

Works for me.


1. & 2.) There is no way to get more space for your tracks, but if do not need all the different kind of maps then simply limit it to the OSM map by adding this tag:


– so you will get more space for your track. If only one map is chosen the map picker disapears even though there are gpx-files – this is listed as bug.

3.) No, currently these tracks are simply called GPX_Nr, but you can display them in different colours with this tag:


Three more questions though.

The map picker at the right is very consuming wrt vertical space in my installation which means I can fit fewer tracks on the menu than I would like to. Can this be helped? Again, Firefox 3.6.13 but similar problems exist with Konqueror.

Can I restrict the number of maps without losing the map picker?

I would like to have more descriptive names with the tracks on the picker. I was hoping that the name tag in the metadata would be honored. Is there any way to bring the track name to the application’s attention?

Looking at your WP-page I could see you are adding 2 GPX files and one TXT file. But when you click on the (+ symbol on the left site, only two GPX files are listed – the TXT-file is not loaded at all. You should keep your domain unique, your WP-link is without www but you added your textfile with: „http://www.naturfreunde-schriesheim.de/Mannswiese/textfile.txt“.
Pls. post the new shortcode you are using ([osm_map ...]), after removing www in the address for the textfile, since included filex have to be on the same domain as your WP-blog.

Hi ipofanes,

I could not check your page since it is protected:“Dieser Artikel ist durch ein Passwort geschützt. Um ihn anzusehen, trage es bitte hier ein:“

And beside this, did you check the behavior if you choose temporarily another template and which browser do you use?

You can find a sample for multiple GPX-files within on map at this HanBlog-post.

I fail to get markers displayed on my map.

Here is the code I used:

[osm_map lat="49.492" long="8.705" zoom="14" width="600" height="450" marker_file="http://naturfreunde-schriesheim.de/Mannswiese/textfile.txt"]

and the result can be seen on http://naturfreunde-schriesheim.de/?page_id=69

Some symbols are shown very briefly before covered by the map. Could anyone tell me what I am doing wrong?

Also, how can I display multiple gpx ways?

Hi Corey,

yes – it’s like this.
If you plan such a big site these technical topics have to be considered as well, because to change your plattform / CMS / plugins after some time is a big effort or sometimes even impossible without a lot of manual work!

Currently with OSM plugin there are these ways to implement your site:
* Load it from a text file: Glakit.org (fastest loading time)
* Load it by scanning the customfields of your blog: Fotomobil.at (Slowliest loading time)
* Load it from an external source: Freeroute.fr (most elegant and open way 😉

Keep in mind that you might want to offer your data to others as well or share it with another site/CMS/plugin.


I was worried about something like that…
Just so I understand you, the workaround makes it so that the OSM plugin calls the marker file to populate a map, instead of querying the WP database each time—but there’s no easy way to automatically update the marker file every time a new WP post is created with geotagging. Is that right?


Hi CP,
the next OSM-Version will support custom post types, but there is another point which should be considered: If you are planning a site with thousands of data points in the map it will take quite a long time to scan the database of WordPress (custom fields) for all (thousands of) posts with geodata whenever the site is loaded.
For such a huge site the mechanism has to optimized – there must be no scanning at loading time of the page but just adding another point to a datapointlist whenever a post with geodata was added. Databaseoperations take a long time. This optimized implementation takes some effort and is not planned up to now.
Some time ago I made some tests to create a markertextfile with all geotagged posts and load this at once – this is a workaround but not that comfortable since the file has to be created whenever a post is added.
Gtx, MiKa

That would be fantastic, MiKa. I’m planning a big journalistic mapping project—something like this, but with tens of thousands more data points: http://www.warisbusiness.com/diy/map/
Custom post type support will make it a lot easier to manage. Several of the WordPress plugins for Google Maps already support custom post types, but I’d like to go with OSM because the license terms are better.
Anyway, if you’re planning on adding this feature in the next release, I’ll go forward with the OSM plugin.


Hi CP,

custom post types were not implemented yet, but there is a plan to support it since we want to use it for Fotomobil,too 😉
The next version of the OSM-plugin will be released a couple of days after WP 3.1 was released. Custom post might be part if this version.

Gtx, MiKa

great plugin, but i can’t seem to get it working with custom post types in WP 3.04.
for some reason, the osm plugin doesn’t find the custom field with the geodata in my custom post types—at least, geotagged custom post types don’t render using the [import=“osm_l“] shortcode.
ideas for a fix? any plans for custom post type support?

Thx Mika,
I was sure having checked it out, but obviously I didn’t notice it…. 🙁
Now it works again.



there is a linefeed/return between the marker-argument and the marker_name-argument. Simply replace it by a space.

You should store your icons somewhere in the uplad-folder and load the icon like this:

Gtx, MiKa

Hi MiKa,
here it is:

I put all my icons to the plugin folder since it never worked with the upload folder for me. After an osm-plugin update I refreshed this folder with my own icons.

an older map that works fine (http://blog.reiseland-brandenburg.de/furstenberg-havel-2):
[osm_map Lat="53.1893" Long="13.1340" zoom="14" marker="53.18663,13.13068" marker_name="30camping.png" marker_height="20" marker_width="20" ov_map="0" control="scaleline,scale,mouseposition"]

a new map which doesn’t show the icon (http://blog.reiseland-brandenburg.de/ein-ferienhof-ganz-weit-weg-in-der-uckermark):
[osm_map Lat="53.251469" Long="14.361121" zoom="10" marker="53.251469, 14.361121"
marker_name="2highlights.png" marker_height="20" marker_width="20" ov_map="0" control="scaleline,scale,mouseposition"]

Schöne Grüße,

Hi CC,

on your page I could not find the reason just by reading the source of the page. Please post:
an URL and the OSM shortcode of that post which works
an URL and the OSM shortcode of that post which does not work
Gtx, Mike

Hi Mika,
I’ve worked now for several month with your plugin with great joy and no errors in WordPress 2.9.2.
Now it occurs that all the icons I insert into the maps of new articles are not shown. The ones of the old are shown correctly – even if I modify them or change the icon.
Right now I’m using your latest update, but the phenomenon happened earlier.
Do you have an idea?

Thanks for the information! There will be another version of the OSM-plugin within November. I will place the shortcode somewhere else which allows to copy it in Google Chrome as well.

In Google Chrome, it is not possible to copy the text from an alert box. Therefore one has to laboriously re-type the result of clicking on the map in settings to get the shortcode. Could you possibly do it as well or instead of an alert by placing the text in a div or textarea on the page from where it could be copied in all browsers?

Hi Marko,

currently there is no way to add the red cross if you add marker with the marker file, but the popup has to be closed by clicking the marker again.
I will have a look if there is way to add this feature in one of the next version.
Gtx, Michael

Hi Stefan,

this sounds good!

Checking your Korea_Marker_2009_V1.txt file I have seen there are still some links outside your domain. So next step is to replace them with addresses on your domain:
both becomes:
Now add the marker_file tag again – you should see the popup-marker and if you click your header image is inside.

In the next step you should reduce the width=“600″ to width=“500″ to make it matching with your dialouge-theme.

Hi Stefan,

let’s do it step by step to find the reason:
Just load the map and include the gpx file but delete the marker_file in the tag.

Do you see the track(I can not see preview sites)?

Hi MiKa,

i tried to download the files and upload them to my blog.

[*osm_map Lat=“36.315″ Long=“128.101″ width=“600″ height=“450″

The same problem (http://www.stefan-goebel.net/?p=151&preview=true). I see the map but no track 🙁

Hi Stefan,

you must not load the track and text file within your post/page from the Fotomobil.at page but copy it to your blog and load it from your domain:

[*osm_map Lat=“36.315″ Long=“128.101″ width=“600″ height=“450″

Means upload a pgx file to your uploads folder and use it within the OSM-tag.

i tried to use the osm plugin and it works. I only have a problem if i try to show a gpx track: I see the map but no track.

I also tried to use the example tag:
[*osm_map Lat=“36.315″ Long=“128.101″ width=“600″ height=“450″

I always only see the map but no track.

I use wordpress 3.0.1 and osm plugin 0.9.3.

Thank you a lot for your help.


Hi Christian,

up to now there is no way to take the geoaddress automatically form the post

Hi Mika,
great plugin!
I do have a question regarding markers. a single marker can be added by

[… marker=“33.54,85.333,TextCustomfieldname“]

So, the marker text is taken from a custom field. Is it also possible to take lat,lon from the post’s geolocation custom field?


@ Sagun: Basically it’s like this – adding a google-Layer – to make it general some lines more are needed.

@ Arne: I will consider this issue in the next version. Just let me know as soon as your blog is online.

Problem with more than two maps showing tracks on one page

nice work. But I discovered a problem, when having more than two maps on a page. In case of three maps with different tracks, the first map shows the correct track. The second one shows the track for a short time, then it disappears (probably until the third map is fully loaded). The third map contains the third track and the second track, while the position of the second track on the map is the position the second track would have on the second map. Since my blog isnt online yet I cant give you a link. Maybe any other people are having the same problem. I read the message of Timo, but there wasnt any solution posted…
Thanks in advance.


Hi Mika,

Thank you for the response.

I was thinking adding a layer would server the purpose of what I am trying achieve. The objective is to use the OSM plugin as is but also provide an option to view the map using the google options.


I am assuming the rules need to be defined in the osm/osm-openlayers.php but I don’t think it’s as simple as adding the following lines in the code:

$Layer .= ‚var layerCycle = new OpenLayers.Layer.OSM.Google(„Google Hybrid“);‘;

else if ($a_Type == ‚Google Hybrid‘){
$Layer .= ‚var lmap = new OpenLayers.Layer.Google(„Google Hybrid“);‘;

How can this be incorporated with the plugin? I think this is more of a openlayer question than the plugin itself but any insight to how this can be a possibility is greatly appreciated.

Thank you,



the basic idea of the OSM-plugin was to support the OSM-idea. After some time it was extented to be used for other maps as well.
After checking your link I thought it might be usefull to extend the extmap codes to enable hybrid maps since this kind of map is not covered by OSM but several people were asking for it.
But this may take some time and you have to wait for the next OSM-plugin version.
Up to now theCycleMap (type=“CycleMap“) is the most usefull for hiking.

Gtx, MiKa

Thank you so much for your prompt response. I was searching for documentation how the hyrbrid view can be achieved and this is the closest I came up with – http://wiki.openstreetmap.org/wiki/Google_Maps_Example.

Is this a possibility with the plugin? I am trying to create hiking routes using the plugin and trying best how to display the routes using the plugin but in a terrain and/or hybrid option.

Thank you again,


Hi Sagun,
1.) Yes, you can add routes and define a different colour for each route within one map. Have a look at: OSM-plugin-Wiki for gpx_file_list and gpx_file_colour.
2.) No, there is no hybrid view available up to now.
Gtx, MiKa


I was trying to figure out how to add routes – both single and multiple using different colors. Is there a way you can do that using this plugin? Also, does OSM plugin allow the default settings for a hybrid view?

Thank you,


Hi Mika,

in post 53 Deb described a problem which you had not seen before. I have just experienced something very similiar. At the top of every page I get the following error message:

„Warning: split() expects parameter 2 to be string, array given in C:\xampp\xampp\htdocs\wordpress\wp-content\plugins\osm\osm.php on line 212“

As you can see I’m developing the site offline so I can’t give you a link to have a look.

Debs error referred to line 242 while mine refers to line 212. I haven’t edited the osm.php file at all and have tried deactivating, deleting and then reinstalling the plugin, but the problem remains.

If you can think of any other information that would be helpful please let me know!

Many thanks,


It takes quite a lot of time to find all the place where I would like to add a marker. So when travelling it would be very nice just typing in the name of the destination and with another click adding a marker at that position.
Is that possible to do that? And how?

Hi Timo,

sorry for the late reply – I was busy these days and I did not reproduce your report yet – but I would like to do it at weekend if you put your page online again (the posted link does not work).
There was no major change in the last release, which OSM-plugin version did you use before updating?


Since updating the OSM Plugin I’ve encountered an intersting bug/problem. I’ve an article with four maps. Each map should show a single track.

Here’s the code of the four maps:
[ osm_map lat=“50.6″ long=“10.782″ zoom=“13″ width=“600″ height=“450″ gpx_file=“/tracks/20100227_vesser1.gpx“
[ osm_map lat=“50.6″ long=“10.8″ zoom=“14.99″ width=“600″ height=“450″ gpx_file=“/tracks/20100227_vesser2.gpx“]
[ osm_map lat=“50.597″ long=“10.8″ zoom=“14″ width=“600″ height=“450″ gpx_file=“/tracks/20100228_vesser3.gpx“]
[ osm_map lat=“50.605″ long=“10.79″ zoom=“14″ width=“600″ height=“450″ gpx_file=“/tracks/20100228_vesser4.gpx“ ]

Since the last update there is always one empty map and one map showing two tracks different tracks at the same time.

Take a look: http://www.orangeorb.de/blog/2010/03/126

I also already tried a different theme. But as the maps worked with an older version of the osm plugin I think there might be a bug?!


Hi Juan Jose Pablos,

thank you for your feedback!
To be honest: I do not know it anymore. Maybe the decision was influenced by a glas of whitewine, maybe it was just a bottle of wheatbeer.
Your are right, to be consistent with other applications it should be limited to three letters. If you are posting a reason to change it, I will support both in future releases.
Gtx, MiKa

This is part of the WP-classic-theme. After your comment I recognized that this WP-theme is not even available for download anymore.
I will change this to a sample for twenty-ten theme

Sorry, the code I wanted to mention was hidden. I wanted to point out the line:

– this is something themspecific as I experienced and understand logically now.

Hi scruss,
that does not break but is a well made solution for a nice track 🙂

Hi Cornacap,
nice to read about your success. What do you mean with „onlyto mention …“?

happy mapping, MiKa

Hi Mika,
I solved my problem now. It was based of a misunderstanding of your explanation. The whole time I was focused on the question ‚Where do I have to insert the function?‘. Today I realized: the function has always still been integrated in the osm.php – nothing to concern about …
Now the rest was easy to implemet (only to mention to delete the line “ as it is a unique part of your own theme…).
I tried it out with several themes. No problem (not to mention the geo-preparation – that was really easy from the start…).
Good thing you have done!


Hi Scruss,

yes, the size of popup-marker is fixed up to now. I will add a way to set them by your own within the next version in July.


Is there a way to make the photo popup bigger? With a title longer than just a few characters, there no room for an image of any size. I’d really like to be able to have an image around 640×480 along with the title.

Otherwise, I really like your plugin – thanks!

your are right, at the moment you have to use a text file and add the markers manually.
I will release another OSM-plugin version within July – including this feature to show a map with markers just for a specified category. So you can start already to geotag your posts.

Gtx, MiKa

yes, this is exactely what i meant.
so in the meantime i’ll have to stick to textfiles for the different markers. maybe i’ll have a go at programming wordpress plugins. seems a little intimidating.
all the best

Hi Old-Map-Blog,

you have got a nice blog with a nice topic.

Your are talking about a map with all geotagged posts, aren’t you? Something like:
Display a map with markers for all posts of category „photography“ with the marker the „photo.png“.
Which could look like:
[ osm_map … marker_name=“..\…\uploads\photo.png“ import=“osm, photography“]
Is it right?

This is not implemented yet but could be considered within the next version.

gtx, michael

Hi Cornacap,

using template tags is not something themespecific but works in the same way in all themes – if you are not familiar with it I suggest to start with simple php-commands just to echo one line in any WP-theme.

To get an osm-map with geolocation needs a:

* customfield definition in your osm-plugin-settings
* geolocation in your post
* modification of your WP-theme to show the map

If it does not work, one of these three steps are not done well.
Gtx, MiKa

great plugin!
is there a way to filter certaint categories of posts?
on my site i have posts containing old maps and pictures of places.
i’d like to generate different maps showing only the pictures or only the maps. maybe one map, but with different markers.
is it possible to do this using your plugin?
thanks so much in advance!

Hi Mika,
thank you for responding!

For understanding the principle, I just tried the default theme that comes with WordPress. Later on I will integrate it in an own theme.

Maybe this example will help other noobs like me 😉

Best regards,

Hi Cornacap,

it depends which WP-theme you are using. It is in:

At Fotomobil.at I put it in the index.php dirctly after:

If you leave a link to your page it is easier …

Thank you, Mika!
I’m quite happy with this plugin. The only reason switching to Googlemaps would have been using the satellitemap.

I have a more nooblike question:
On the plugin site is a description of using template tags. I’m not to familiar with wordpress by now. I tried to figure it out with codex.wordpress-site. But still did not succeed with the question:

Where exactly do I place the code of the given template tag?

I would appreciate a hint 🙂


Hi Cornacap,
up to now there is no way to display googlemap-layers with the OpenStreetMap plugin. There are many google-map plugins, if you prefere including it via openlayers you could do it via a php plugin as well.
gtx, mika

Hi, is there way to integrate Googlemaps-layers, too? I know how to integrate them in Openlayers, but not shure how to handle the php of the plugin.

Hi Balaji,

thank you for sharing this information!
There is also a way to do this within the OSM-plugin. I will add this style settings in the next osm-plugin version, so the „Picture Perfect“ WP-theme will work without any modifications.

Thx, MiKa

Hi MiKa,

Thanks for the firebug pointer (The post style was being applied last hence I think this issue). I have resolved it on my site. The change I made (Basically I made the top margin to be 0) is given below (in case it will be of use to someone.)

Theme used: Picture Perfect
File: style.css

#content .post img {
margin-bottom: 10px;
/* Modified the line below to be 0 from 10 so that the OSM plugin map will display without the horizontal space */
margin-top: 0px;

Thanks again,
– Balaji.

Hi Balaji,

the issue of Björn was solved within OSM-plugin version 0.9.1. If the map is shown in the correct way in the settings-page some styling settings are the reason for lines/spaces in the map.
Analyses without any link to the problem is difficult. If you are using Firefox you get the style info with Firebug.



Thanks for this nice plugin. I am using your plugin with „Picture Perfect“ theme. I am seeing an horizontal space in the map on my post (maps look fine on the settings page so I guess it is a styling issue as you had mentioned before). I saw comment # 51 by Björn but that code seems to be there already in osm.php. Is there any other file I would need to modify? I tried the suggestion you had given for another theme but I am still seeing the horizontal space.

Also the overlays on the map (Like the zoom and movement buttons are visible even when the map is in the background. E.g, I have a photo in the post and when a user click on it it will enlarge the photo. At this point the map is behind the photo and not visible but the markers and zoom buttons are visible on this photo. How can I send the overlays to background layer?

– Balaji.

Hi Ruena,

thank’s for your detailled technical feedback/analysis!

You’re right – loading the map at the very end is not required for the current implementation, I did it just to be on the safe side 😉

I could reproduce your feedback and this feature was not covered anymore with the current version. I will add this test to the standard test before releasing a new version.

The solution is found – like all the time – in the documention and I fixed it like this:
jQuery(document).ready(function(){“ becomes „jQuery(function($) {
})“ becomes „})(jQuery)
The test was Ok.
The fix will be part of OSM-plugin V0.9.1 which will be released within the next view days as soon as WordPress 3.0 is released. I try to avoid too many updates within a short time and I want to include the WP 3.0 tests with OSM-plugin version 0.9.1.
Meanwhile you could modify it by yourself and continue with the update as soon the next version is released – it will show several maps within on post/page.


Multiple Maps now working by hack

I removed the „jQuery(document).ready(function($) {“ and „})“ from osm.php and now it seem to work fopr my blog. But I guess this is just a bad hack. You must have had a reason for doing the osm stuff after the document has been loaded. Can you explain why?

I look forward to your answer.


P.S. here is the patch

diff -r b8d514fb70bd wp-content/plugins/osm/osm.php
— a/wp-content/plugins/osm/osm.php Thu May 13 20:45:56 2010 +0200
+++ b/wp-content/plugins/osm/osm.php Tue May 18 10:04:05 2010 +0200
@@ -563,8 +563,8 @@
$output .= “;
$output .= ‚/* */‘;
$output .= ‚ ‚;
$output .= “;

Multiple Maps not working

I use WP2.9.2 and the OSM-plugin 0.9 on a my private closed family blog. (therefore I can give no example here)
The faq says, but the plugin does not support, multiple maps on my blog. If there is more than one map on a WP-generated html-page – no matter if in one post or in different posts – only the first map is displayed,
I guess it is jQuery(document).ready(..). In my tests I had a html-page including two maps. When I changed the first „jQuery(document).ready(..)“ to „window.onload = (…)“ both maps were displayed. But patching window.onload = (…) into osm.php did not do the trick.
Now I am stuck, since I am a programmer, but not a web-programmer.

Thanks for the Plug-in, I am looking forward to your answer.

Hi Debs,

for any reason there was a problem with the customfield at your blog, I can not reproduce it and I do not know which information is needed. Maybe I will contact you again if another persons reports this kind of problem.
Within May the WordPress Version 3.0 will be released, afterwards I will do some tests and publish OSM-plugin V 0.9.1 which will solve the problem with the grid/white lines in the map on your side.
Thanks for the link on your side – instead of faktor.cc the plugin site: http://www.Fotomobil.at/wp-osm-plugin would be nice to guide people directly here 🙂

gtx, MiKa

Hi Mika
thanks for responding so quickly – I didn’t make a custom field name – the code I put on the page is:
[osm_map lat="38.192" long="-1.893" zoom="18" width="600" height="450" marker="38.192,-1.8932" marker_name="guest_house.png"]

So I thought I’d add a custom field name to see what happens… When I added a custom field name and clicked save options I got the following error on the settings page (at the top in red):


And the map zoomed back out to the starting point.

AND the error on all pages has disappeared!

So, hope that helps a bit. Going to try and do some more fancy maps later today! Thanks a bunch for this great plugin – much happier using this than google 😉

Hi Debs,

there might be a problem with the customfield to set the geodata of your page/post. Could you post here these informations:

* WordPress-Backend=>settings=>OSM=>Custom Field Name:
* in your post/page the name and the value of your customfield

gtx, mika

PS: The grid in the map will be corrected in the next version.

I installed the plugin, which mostly works, but there is an error on all pages:

Warning: split() expects parameter 2 to be string, array given in /home2/debb2748/public_html/wp-content/plugins/osm/osm.php on line 242

(you can just see it at the top of any page) – my site is:

I’m not very technical, so if anyone can help me I would really appreciate it.

Hi Björn,

of course this kind of technical feedback is most welcomed – thx.
This topic will be considered in the next OSM-plugin version (may). You will be able to update without getting the border again 😉


Hey MiKa,
thank you for your reply. I have changed your plugin and add the following line to osm/osm.php:

$output .= ‚#‘.$MapName.‘ img {padding: 0; margin: 0; border: none; }‘;

Here a set of lines include the new line from me:
Osm::traceText(DEBUG_INFO, „MapCounter = „.$MapCounter);

// if we came up to here, let’s load the map
$output = “;
$output .= “;
$output .= ‚#‘.$MapName.‘ {padding: 0; margin: 0;}‘;
$output .= ‚#‘.$MapName.‘ img {padding: 0; margin: 0; border: none; }‘;
$output .= “;

Bye Björn

Hi Micah,

your post looks advanced! Only a few people include „non-standard-osm-maps“ into their pages. That’s the reason why it’s not documented in all details up to now. But it’s working nice on your site.
The „extmap_type“ is the class-information for the OpenLayers library.
Changing the code is a short-time solution to get rid of the link in the map, as the change is lost with the next plugin update. Since some people even avoid a link to value others work, there won’t be a way to turn it off generally, but at least modify it. Give some to do it with the next plugin version.
Let me know if you miss anything to include other maps, there will be a new version in may – documentation will follow on the osm-plugin-page.
Gtx, MiKa

Thank you for this plug in.

I have just used the OSM Word Press plugin at:

I changed example to instead use The Ordnance Survey ‚Street View‘ tiles served up from OSM servers.
I did it with this code in my post:

[*osm_map long=“-1.51″ lat=“53.82″ control=“scaleline,scale“ zoom=“15″ width=“500″ height=“450″ extmap_type=“OSM“ extmap_name=“UK_OS_StreetView_Map“ extmap_address=“http://c.os.openstreetmap.org/sv/${z}/${x}/${y}.png“ extmap_init=“numZoomLevels: 17, transitionEffect: ‚resize‘, sphericalMercator: true“ type=“ext“]

I have put ‚Contains Ordnance Survey data © Crown copyright and database right 2010‘ with link to license underneath map but I would like to replace ‚Data by CC By-CC by OpenStreetMap‘ within map itself. Is there anyway within the code to be posted in blog post to do that.

Also where can I find more info about what the value ‚extmap_type=“OSM“‚for does? Or if not what does it do?

Hi Björn,

the OSM-plugin uses the CSS of your WP-theme. Your WP-theme may have some padding and border settings for images which lead to this strange behavior. Some WP-themes allow a configuration of these settings (set them to zero). I will have a look if there is a way to ignore all theme-specific settings for the next version to fix it with the next update.

@ Chris:
Sorry, for any reason your comment was in the spam-folder so I did not answere yet. I do not have any experience (good or bad) with qtranslate. I will do some work on the OSM-plugin in may and I will consider some tests with qtranslate, too. I will post about the experience here.

@ Ian:
I am not sure whether there is a beta-version ready before may 6th. Anyway I recommend you to use the customfields to geotag your posts since the osm-plugin is also adding the geo-information to your post according to the standard. Up to now there is only a dot in the map, but the next version will be downward compatible – means no changes in the posts will be needed.


When can you provide the beta version? I’ll starting my trip on May 6h, so after that date, I’ll not be able to test.

If you can provide the version to test earlier, I can test it.

Just write me an mail.

Hi Ian,

your right, currently a marker text file is the only way to link to all your posts within one map. The way it is implemented now is only marking it wihtout any information to the post.
Since several people asked for this feature to implement their travelogues and it is also an idead for fotomobil.at for a long time I will consider it in a version that is planned for the end of may.
Let me now if you are interrested in getting a Beta-version in advance.


As far as I understand, the feature to show all blog posts on the map, only shows small dots.
What I want is to add a „marker“ for every post that offers a popup with title of the post and link to the post?

Is that possible, or do I have to create a marker-textfile that contains all posts manually?

Hi Michael,

it is not the theme. I tested another one
it is not the browser (Firefox 3.5.9)
I did not yet test all plugins. Don’t dare to disable qtranslate as it is a little – hm – say complicated…
Do you have experience whether this plugin could be an issue?


Some more infomration is needed – you are using the Atahualpa Theme which was tested with the OSM plugin.
But since this is a very powerful theme there are also some ways to „interact“ with plugins.

* Did try to change the theme temporary to check whether the plugin is working with anohter one?
* Which plugins do you use – could you disable them step by step to see if there is an influence?
* Which browser do you use – did you try another?

It is not that easy without any detailled information, once the reason is found a workaround / bugfix can be implemented.

Sorry, there are some steps to find a solution …

gtx, michael

I am currently working on a version which will be released in March. I will consider your comment about the zoomlevel.
Thx for the feedback.

Hi Bernhard,

up to now there is no interface to show maps with template tags – but the effort to implement it is not that big and could be considered in the next version within March. It would look like:

OSM_displayMap(width, hight, zoom, type)

The geo data (lat/long) is taken by the customfield. If there is no customfield with geo data no map is shown.

Of course you could „hack“ my plugin doing it by calling directly my functions, but I strongly dissuade from this, since your page would not work anymore if I change the internal stuff in later versions. Only the interfaces are kept compatible.

Let me know if this fits your idea. If so, I will send you a Beta-Version within the next three weeks and ask you for your feedback.

Hi MiKa,

and thanks for your reply. Unfortunately, I’m not quite sure if I’m getting you right. What I’d like to do is: If a post (or page) has geo metadata, I’d like my theme to display (not just link to) a map for it. I’m currently doing this using the geopress plugin — se eg here: http://kati.pregartner.net/2007/04/28/wein-und-kunst-2007/
— but I’m not too happy with it, as it’s practically unmaintained, loads the required javascripts also for posts without geodata, and has rather messy code I’m not really feeling comfortable hacking with.

Hi Bernhard,

if you click a city/village of Fotomobil.at you will find a link „Map“ at the top of the post. This is implemented with three template tags:

OSM_getCoordinateLat // lat of current post
OSM_getCoordinateLong // long of current post
OSM_getOpenStreetMapUrl // link to OpenStreetMap with geodata of current post

They were not documented up to now since I have not been asked for it. It is not just using the functions but you have to check whether the plugin is activated or not and to check whether there are geo data or not. And then you can trace the link.

Let me know if you are planning a blog using template tags – but consider showing maps on every post will slow down your blog …

Hi Muckel,

the address of your GPX file is wrong. There are some tags (code) between „wp-content“ and „/plugins“ in your address. After correcting the address in the osm-shortcode it will work.

Beside this you should not place the GPX file in the OSM folder since this will be deleted at the OSM-plugin update. Copy all your private data (like GPX file) to the „upload“ folder of your WordPress installation.

Gtx, MiKa


my english isn’t well but I hope you can understand me.

in my newest Blog i have installed this great PlugIn but it doesn’t work right. I get the following message: „Error in loading GML file Error in loading GML file …“

So why I get this error and how can I repair it?


Hallo zusammen,

habe ein neues Blog aufgesetzt und bei jenem das PlugIn installiert. Leider bekomme ich folgende Fehlermeldung: „Error in loading GML file Error in loading GML file ….“ und das obwohl die Test Datei hochgeladen ist.

Weiß jemand woran das liegt und vorallem wie ich jenes beheben kann?
Liebe Grüße und vielen Dank

Hi Carsten,

this was already planned for V0.8.7 but there was no time to complete it. I will publish a new version within first half of february including the feature to add several gpx files in different colours.


Hello Michael,

thanks a lot for this great plugin. It is much easier to bring a map on the screen compared to hacking the html code with all the openlayer stuff by hand . 🙂

One small feature request: Is it possible to show more than 1 gpx file on the map? I tried [osm_map ... gpx_file=".../file_1.gpx" gpx_file=".../file_2.gpx"] But in this case only the last file is used.

It would be also great if they can have individual colors and names (for the blue box in the upper right corner).

Greetings, Carsten

I also have a small Request..

I’m missing the options to add the Lat&Lon Meta data under the Title, or else a function to display the Name of the city which is the nearst of the la&lon.

It would also be nice, if the osm map then just opens in a iframe like WP does it with Photos if you have Lightbox installed.

And of course.. a funtion to automatically add a standard lat&lon to the post if no other lat&lon is given.

Integration of OpenRouteService would be very, very great!!!
For example: Show a button (any icon) on the map with the text „how to get there from where I am“ or anything else. When pressing the icon you can enter you actual address an see the routing info. That would be great 🙂

Phantastic PlugIn !!!

Thanks for this plugin!
I have a request for enhancement:
It would be great having the ScaleLine configurable either for the whole site or for each map individually.
I hacked it for me to have it on all maps:
— osm-openlayers.php_orig 2009-10-14 22:02:45.000000000 +0200
+++ osm-openlayers.php 2009-10-14 21:44:38.000000000 +0200
@@ -24,7 +24,8 @@
$Layer .= ‚ controls:[‚;
$Layer .= ‚ new OpenLayers.Control.Navigation(),‘;
$Layer .= ‚ new OpenLayers.Control.PanZoom(),‘;
– $Layer .= ‚ new OpenLayers.Control.Attribution()‘;
+ $Layer .= ‚ new OpenLayers.Control.Attribution(),‘;
+ $Layer .= ‚ new OpenLayers.Control.ScaleLine()‘;
$Layer .= ‚ ],‘;
$Layer .= ‚ maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),‘;
$Layer .= ‚ maxResolution: 156543.0399,‘;



I need to set MULTIPLE markers + Text on the Map, but I can only set one.

How can I set more than one?


At the moment there is no way to modify the position or to disable the license-link. There will be OSM Vers. 0.8.6 within August – maybe I will add an option to set the position.
If you are planning a blog using OSM plugin intensivly send me an e-mail …

I have been playing with the plugin the whole day. Thanks for the great work!!

But there is a question that would be interesting to get an answer for.

Why is the Creative Commons License visible (not completely but) close to the centre of my maps? I have no problem to have the link to openstreetmap.org in the lower right corner and mention the project in the ABOUT section, but this is kinda annoying.

The license is not visible at all on your site MiKa, how do you do this?

best wishes,

Max 😉


The shortcode for:



[*osm_map Lat=“36.315″ Long=“128.101″ width=“600″ height=“450″ gpx_file=“http://www.faktor.cc/Fotomobil/wp-content/plugins/osm/Korea_sample.gpx“ marker_file=“http://www.faktor.cc/Fotomobil/wp-content/plugins/osm/Korea_Marker_2009_V1.txt“]

So, there is one GPX-file to display the track and txt-file to display the popupmarker with photos. Just copy the sample-txt-file and modify it! It is organized by tabs and very „sensitiv“ for missing tabs …

Thanks Mika! But that’s not the problem. It was that the gpx must be in same server than WP.

I don’t know why but tested your sample and does not work on my site. Also the sample at your page

[*osm_map Lat=“36.315″ Long=“128.101″ width=“600″ height=“450″

does not work on my page not too.

Finally I’ve uploaded tracks at my site (/gpx/ directory) and now it works. With and Without CDATA. I don’t know nothing about GPX format, but that is recorded by my GPS datalogger and works in programs like Marble or Viking.

So It’s a good starting point for me. 🙂 I’ve just come back from Indonesia and have tracks of my routes that I want publish with maps and photos.

If I can help you, for example translating help from English to Spanish, just let me know. 🙂


Hi! I’ve been waiting long time for this plugin. Thanks a lot! 🙂

Just staring use but have some problems.

1) Only can view one map in a post. I understand that you say it’s possible to have several in the faq at http://wordpress.org/extend/plugins/osm/faq/

2) Can’t see gpx traces. After trying with my own, I tried with the example at your page and I can’t see not too. There is some restriction as to be at same server or so?

You can see my test at http://colegota.mapamundi.info/cb/mapas-de-osm-pruebas/ Just leave the code working for the example and „commented with *“ the rest if you want to try.

Using WP 2.8, seeing in Firefox 3.0.8 under GNU/Linux.


@ keule
If you want to add a text to your marker you have to use the „Custom fields“ and add a new one (you chose the name „OSM_marker_text“). It is case-sensitive, therefore it has to be written in the same way.
You will see the text if you double click the marker. You can see a sample here:
Let me know if this sample fails at your blog.


i try to do something like this (with the wordpress plugin):

[osm_map lat="46.7839" long="12.0383" zoom="12" width="440" height="350" gpx_file="http://www.w650.eu/wp-content/plugins/osm/sardinien/1.gpx" gpx_file="http://www.w650.eu/wp-content/plugins/osm/zurburg.gpx" marker="46.791218,12.040674,OSM_marker_text" marker_name="burg.png"]

the marker appears, but the text which i defined in an special field does not. do i make something wrong or is this a bug. thanks.

@ Bernhard
1.) there is no template tag yet, but there will be one in the next version to add a map of the post’s geo meta tag in your footer or header.

2.) you need not use lat/lon if you want to show a map of the actual address (defined in a customfield). Just add this shortcode: [osm_map] to see a standard map of the act. address.

To add the geoaddress in your comment field you have to modify your theme. Mostly there is a comments.php files in your theme folder. Within this file there is loop that traces all your comments with:

Simply add somewhere over there (eg. after this line) these lines to trace the geo info:

extra_lat != “ && $comment->extra_lon !=“){echo Lat:‘.$comment->extra_lat.‘ ‚.’Lon‘.$comment->extra_lon;}?>

It’s done this way in the sample where you can find the geo address at the commetn:


Hi, today i was playing around with the vistors adding markers feature wich is very nice for colaborative mapping. It would be nice if the latitude and longitude data would be written to the comments after submiting. (May be together with an address field)
Thanks for this Great Plugin.
Best jan


Since I am crazy about geotagging photos, using the geocode of photos in the OSM plugin will be implemented in one of the next versions for sure.
Actually V0.9 – end of may – will focus on popup marker and interaction with the visitor of your site.

hi, very nice plugin, it would be nice to add geocoded photos from the ng gallery. best jan


Thanks for your ideas! Some of theme were already on my list (like autocentering or zoomdetection) and other ideas are new to me (like generating a map just by a link)!

The next version is focusing on interfaces to other plugins, a Beta-Version is shown at the gcStats-plugin page of Michael Jostmeyer, showing the combination of his geocaching plugin and the OSM plugin.

The plugin is still in the startup phase, even the internal SW-architecture is not fixed yet. As soon as the planned features are covered I will consider an OS project to use the advantages of the community. Nevertheless feedback and discussion is welcome all the time – the more detailed the better!

Awesome job on the plugin.

I just played with it for a few minutes and was wondering if you plan on extending it (is there a roadmap)?

Wishlist 😉
– Elevation Chart (gpx)
– Speed Chart (like in the XML Google Maps WordPress Plugin )
– generating a map from a link to a kml/gpx file (without osm_map shortcode).
– autocentering on track
– calculate width / height from track (within given values?)
– detect zoom automatically
– alignment option

Maybe if you don’t want to put a lot of additional effort into it you might setup an OS project at sourceforge or launchpad or the like.

That way the community could easily add feature requests and other developers can help improving the plugin.

Take care,