Update marker
This commit is contained in:
parent
666047a9bf
commit
49c09935ed
Binary file not shown.
After Width: | Height: | Size: 947 B |
|
@ -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();
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue