I'm searching for a better way for this : I have several maps to display so I use a GPX file per map of course and also one HTML file per map; the HTML file invokes a .js routine which displays the GPX in google Maps.
The "issue" is that all these HTML files are identical except the name of the GPX file they call i.e.
Index
<a href="Itineraires/1.html">GPX</a>
<a href="Itineraires/2.html">GPX</a>
<a href="Itineraires/3.html">GPX</a>

1.html calls LoadGPXFileIntoGoogleMap(MyMap, "1.GPX")
2.html calls LoadGPXFileIntoGoogleMap(MyMap, "2.GPX")
...
My question : how can I invoque an unique HTML file passing to it the GPX file URL as parameter ?
Thanks a lot in advance

Recommended Answers

All 3 Replies

Just put them all in the same file, and click the one you want.

Thanks but that's the goal, not the way of achieving it !

Put them, one after the other, in the same html file. You can use notepad to do this. Here is a sample of parts the finished file.

<body>
<h1>Index</h1>
<p>
  <a href="Itineraires/1.html">GPX1</a>
  <a href="Itineraires/2.html">GPX2</a>
  <a href="Itineraires/3.html">GPX3</a>
</p>
</body>

This displays:

GPX1 GPX2 GPX3

Each one is a clickable link (which I can't make blue, due to the stoopid color limitations on this site, so I made then green).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.