Hi there!:)
I need to use marker Z-index to put my little markers "under" the main
markes. I've read this manual _http://econym.org.uk/gmap/zindex.htm
and tried to do it with my map, but I'm using an xml file with markers
coordinates, that's why i can't use z-index correctly:( for example
here's 2 part's of my code:
here's a CreateMarker function:
function createMarker(point,name,html,icon,category,hyper) {
var marker = new GMarker(point,icon);
marker.mycategory = category;
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(hyper);
});
gmarkers.push(marker);
return marker;
}
and here's my xmk parsing code:
var request = GXmlHttp.create();
request.open("GET", "****/nodes.xml", true);
request.onreadystatechange = function() {
if (request.readyState == 4) {
var xmlDoc = GXml.parse(request.responseText);
var markers = xmlDoc.documentElement.getElementsByTagName
("marker");
for (var i = 0; i < markers.length; i++) {
var lat = parseFloat(markers[i].getAttribute
("lat"));
var lng = parseFloat(markers[i].getAttribute
("lng"));
var point = new GLatLng(lat,lng);
var infox = markers[i].getAttribute("info");
var str = infox;
var reg = /##/g;
var result = str.replace(reg, "<br>");
var info = result;
var link = markers[i].getAttribute("link");
var name = markers[i].getAttribute("name");
var status = markers[i].getAttribute("status");
var category = "mains";
var hyper = "<a href="+"'"+link+"'"+"
"+"target="+"'"+"_new"+"'"+">"+info+"</a>";
if (status == "1") {
var marker = createMarker
(point,name,link,markerimage,category,hyper);
map.addOverlay(marker);
}
else {
var marker = createMarker
(point,name,link,markerimageblink,category,hyper);
map.addOverlay(marker);
}
}
show("mains");
}
}
can anyone help me in using z-index function with my code structure?
thank you:)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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
-~----------~----~----~----~------~----~------~--~---