> Why is the zoom hardcoded? Wouldn't you want to use:
>
> var mapstyle = map.setCenter(point, zoom);
>
Thanks Larry, that worked. rather than using
var zoom = markers[i].getAttribute("zoom");
var mapstyle = map.setCenter(point, "+zoom+");
I tried
var zoom = parseFloat (markers[i].getAttribute("zoom"));
var mapstyle = map.setCenter(point, zoom);
on your suggestion and it works.
To Xelawho: The only thing I tried to do is use the number of the zoom
level in the XML file in the HTML file, and thanks to Larry's hint I
got that one fixed.
Now I still need to figure out the following:
I want to replace for example
// == show or hide the categories initially ==
show("Accommodation");
hide("Activities");
show("Art-History");
hide("Attractions");
show("Directories");
show("Food-Drink");
show("Goods-Services");
show("Information");
hide("Nature-Parks");
show("Tours-Cruises");
show("Transport");
show("Travel Guides");
in the HTML file with something that gets it from the XML file, and I
tried (to no avail)
// == show or hide the categories initially ==
var xmlDoc = GXml.parse(doc);
var markers =
xmlDoc.documentElement.getElementsByTagName("category");
for (var i = 0; i < markers.length; i++) {
// obtain the attributes for the category
var initial = markers[i].getAttribute("initial");
var name = markers[i].getAttribute("name");
var category = "+initial+("+name+")";
}
so I can just change the XML file.
Thanks for your help so far.
--
You received this message because you are subscribed to the Google Groups
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.