[OpenLayers-Users] GPX Track Info Popup Box

Uwe Gehring uwe at imap.cc
Fri Sep 13 02:10:47 PDT 2013


Hello,

I am going to make my first steps with OpenLayers and feeling great
about it. I set up a web page, which shows my favorite tracks recorded
and saved as GPX as a layer on top of an OSM map. Feel free to watch my
first shot on http://maps.uwe-gehring.de/

I am able to enable/disable various tracks via the layer switcher. Now I
would like to add some more information about the individual tracks,
like length, height, time, heartrate, weather conditions and so on, just
any free text about the track. The best solution would be, that this
information is not shown by default, but when clicking onto the track on
the map and I mean anywhere on the track, a popup should be opened with
the info of the clicked track. So my question is: Is it possible to link
such popup boxes to a track, such that when clicking anywhere on the
track the box would appear. Of course, if the track is disabled in the
layer switcher, there is no possibility to view the info, but that would
be ok. I have seen examples with markers, such as when clicking on a
marker the box appears but I do not like to set a marker for each track
in addition to the track itself.

Kind regards, and TIA
Uwe


More information about the Users mailing list