zoom: 10, visualRefresh: false } ); var infoWindow = new google.maps.InfoWindow( { content: "" }); function CreateMarkerIcon(width,height,primaryColor) { var strokeColor = "#000000"; var cornerColor = "#ffffff"; var baseUrl = "http://chart.apis.google.com/chart?cht=mm"; var iconUrl = baseUrl + "&chs=" + width + "x" + height + "&chco=" + cornerColor.replace("#", "") + "," + primaryColor.replace("#", "") + "," + strokeColor.replace("#", "") + "&ext=.png"; var icon = new google.maps.MarkerImage(); var shadow = new google.maps.MarkerImage(); icon.url = iconUrl; icon.anchor = new google.maps.Point(width / 2, height); icon.size = new google.maps.Size(width, height); shadow.url = 'http://maps.gstatic.com/mapfiles/shadow50.png'; shadow.anchor = new google.maps.Point(width / 2, height); shadow.size = new google.maps.Size(Math.floor(width * 1.6), height); shadow.scaledSize = new google.maps.Size(Math.floor(width * 1.6), height); var coords = [ width / 2, height, (7 / 16) * width, (5 / 8) * height, (5 / 16) * width, (7 / 16) * height, (7 / 32) * width, (5 / 16) * height, (5 / 16) * width, (1 / 8) * height, (1 / 2) * width, 0, (11 / 16) * width, (1 / 8) * height, (25 / 32) * width, (5 / 16) * height, (11 / 16) * width, (7 / 16) * height, (9 / 16) * width, (5 / 8) * height ]; for (var i = 0; i < coords.length; i++) { coords[i] = parseInt(coords[i]); } // var iconShape = { type: "poly", coords: coords }; return icon; // return { // icon: icon, // shadow: shadow, // shape: iconShape // }; }; function CreateMarker(index) { var point = new google.maps.LatLng(parseFloat(data[index][11]), parseFloat(data[index][12])); // var icon = CreateMarkerIcon({width: 32, height: 32, primaryColor: "#7bc618"}); // var icon = CreateMarkerIcon(32,32,'#7bc618'); var icon; if ( data[index][1] == "Transporter" ) icon = CreateMarkerIcon(32,32,'#7bc618'); else if ( data[index][1] == "Rehabber" ) icon = CreateMarkerIcon(32,32,'#00a5c6'); else if ( data[index][1] == "Animal Control" ) icon = CreateMarkerIcon(32,32,'#ff8429'); else if ( data[index][1] == "Falconer" ) icon = CreateMarkerIcon(32,32,'#de5aad'); else if ( data[index][1] == "Vet" ) icon = CreateMarkerIcon(32,32,'#e7f784'); else if ( data[index][1] == "Other" ) icon = CreateMarkerIcon(32,32,'#c6b5de'); else if ( data[index][1] == "Inactive" ) icon = CreateMarkerIcon(32,32,'#aaaaaa'); var marker = new google.maps.Marker( { position: point, icon: icon, shadow: 'http://www.google.com/intl/en_us/mapfiles/ms/icons/msmarker.shadow.png', title: data[index][0], map: map } ); marker.set('index',index); google.maps.event.addListener(marker, 'click', function() { index = marker.get('index'); var s = "

" + data[index][0] + " - " + data[index][1] + "
" + data[index][3]; var county = data[index][6]; if ( county.length > 0 ) { s += ", " + county + " County "; } s += ", " + data[index][4] + "
"; if ( data[index][1] == "Animal Control" || data[index][1] == "Rehabber") { s += "Phone: " + data[index][7] + " " + data[index][8] + " " + data[index][9] +"
"; } else { s += "Cell: " + data[index][7] + "
"; s += "Home: " + data[index][8] + "
"; s += "Work: " + data[index][9] + "
"; } if ( data[index][1] == "Transporter" ) s += "Availability:
" + data[index][13] + "
"; s += "Notes:
" + data[index][14] + "
"; infoWindow.setContent(s); infoWindow.open(map,marker); }); } for ( var i=0; i

Transporter Falconer Rehabber Vet Animal Control Other Inactive