I'm so sorry to bother everyone again, but can I request for an
explanation of how to use different marker colors to show different
classes of animals here, and maybe show a legend somewhere? I've
edited Esa's code with what I have in mind.


// scans the results and calls makeMarker()
/////////////////////////////////////////  Edit column names in this
function ///////////////////////
function populateMap(pnts){
  var len = pnts.length;
  for(var i=0; i<len; i++){
    var props = {};
    props.position = pnts[i];
    props.title = pnts[i].gsx$animal.$t;                // animal
column for marker tooltip
    props.sidebarItem = pnts[i].gsx$animal.$t;          // datefound
for sidebar label
    props.content = "<b>"+ pnts[i].gsx$animal.$t +"</b><p>" +
pnts[i].gsx$datefound.$t      + "<p>" + pnts[i].gsx$timefound.
$t;               // info window content

/////////////////////////////////////////  Is this how we parse the
value in the animal column and set a marker
color? ///////////////////////
if gsx$animal.t = "Reptile" pushpin.color = "green";
if gsx$animal.t = "Medium mammals" pushpin.color = "blue";


    makeMarker(props);
  }
  map.fitBounds(markerBounds);
}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to