how to plugin/layer/map urls depending on variable?

  • I've been flailing around for days now trying to figure out how to use a language cookie to change maps/plugins/layers dynamically. I've got plugins and lays coming along pretty well but have just bumped up against the map. It seems layers called "map" do not like their name changed to something like "frenchMap" and "englishMap" so I can turn whichever one I want on with set(layer[frenchMap].visible,true). It swaps ok but doesn't seem to function as a map unless it is called "map." Clicks don't open new panoramas as expected.
    So now I'm wondering if there might be a way to dynamically change the layer url somehow. Setting a variable like "mapImage" to say "frenchMap.png" and then trying <layer name="map" url=mapImage doesn't work.
    I seem to be barking up the wrong tree!

  • For the moment I've opted to use the inelegant method of simply loading a different tour.xml file depending on the language cookie. It means having to update each file when changes are needed but causes perhaps the fewest headaches.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!