Update marker

This commit is contained in:
Erik Michaels-Ober 2011-02-23 10:50:30 -05:00
parent 666047a9bf
commit 49c09935ed
2 changed files with 10 additions and 10 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 947 B

View File

@ -1,17 +1,17 @@
$(function() {
var map;
currentFeature_or_Features = null;
var roadStyle = {
strokeColor: "#FFFF00",
strokeWeight: 7,
strokeOpacity: 0.75
};
var addressStyle = {
icon: "javascripts/geojson/img/marker-house.png"
icon: "images/marker-hydrant.png"
};
var parcelStyle = {
strokeColor: "#FF7800",
strokeOpacity: 1,
@ -19,7 +19,7 @@ $(function() {
fillColor: "#46461F",
fillOpacity: 0.25
};
var latlng = new google.maps.LatLng(42.358431,-71.059773);
var myOptions = {
zoom: 14,
@ -27,7 +27,7 @@ $(function() {
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
function getHydrants() {
$.ajax({
url: "http://civicapi.couchone.com/boston_fire_hydrants/_design/geo/_spatiallist/geojson/points",
@ -40,7 +40,7 @@ $(function() {
}
});
}
function clearMap(){
if (!currentFeature_or_Features)
return;
@ -52,7 +52,7 @@ $(function() {
currentFeature_or_Features.setMap(null);
}
}
function showFeature(geojson, style){
clearMap();
currentFeature_or_Features = new GeoJSON(geojson, style || null);
@ -67,9 +67,9 @@ $(function() {
}else{
currentFeature_or_Features.setMap(map)
}
document.getElementById("put_geojson_string_here").value = JSON.stringify(geojson);
}
getHydrants();
})