can't see track drawn using openlayers

I’m trying to use Openlayers to draw a track over a (openstreet)map.
I find an example in the wiki,, but it doesn’t work on my pc (slackware) and on my webhost.
The example is a little bit different from the real world sample linked there, there’s a reference to a gpx.js file missing in the wiki.
Anyway, I tried to reference the openlayer script to the openlayer site, as in the example, or to localhost but there’s no trace of a track. I tried with one of my gpx files and with the one used in the example to no avail.
The map is there, the marker is there, the track? nowhere.

Perhaps I’m missing something or the wiki page isn’t up to date.

Any suggestion?

Thank you

Hi emmex,
I too miss the track which is shown in the wiki-example.

I had some probnlems, as I started with the english wiki

First thing I found, that the German Wiki is pretty different from the english version. You need the “mb_bruderholz.html”, a “map.css”, a “file gpx.js” and a “ol_track.htm”. These are all given in the German Wiki. Maybe you can copy the files there an use them.

I put everything together and the result is as follows:
IE-Explorer runs into an error (line 542/46) - no map-tiles etc,
Firefox does the Job but does not show the track, just the marker.
Opera same as Firefox.

If anybody has an idea, please make some noise!

Thanks for answers


I can’t help with this specifically since I haven’t done this. But download firebug, use that to set a breakpoint where you load your GPX and then try to find out why it fails. Should be pretty easy…

@ermj: Firebug did it, Thanks!

@emmexx: my copy of “mb_bruderholz.gpx” had an typing error in line 4 (missing ‘lat=’). Id did not work immediately, maybe browsercahce-problem.

Now it is ok.


Yeah you OL is very picky about the data you feed it. Same with .OSM files, you don’t get much of error indication.