From a0c132ef84a0c749ac3f8f1824ea7bf195946349 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Sat, 28 Mar 2015 22:52:16 -0700 Subject: [PATCH] fix zoom, add todo --- index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index f0a821b..def31d3 100644 --- a/index.html +++ b/index.html @@ -152,10 +152,11 @@

{{name}}

}) // set it and pan to it $('#latestSpot').html(latestSpot) - map.panTo([theLatestSpot.lat, theLatestSpot.long]) + map.setView([theLatestSpot.lat, theLatestSpot.long], 14) // when someone clicks on a row, highlight it and // re-center the map + // TODO show popup, change marker color $('.spotRow').live("click", function(event) { $('.spotRow').removeClass("selectedRow") var rowNumber = $(this).closest("tr").attr("id") @@ -167,7 +168,7 @@

{{name}}

$('#latestSpot').css("display", "none") $('#selectedSpot').html(selectedSpot).css("display", "inline") var selectedCoords = [dataElement[0].lat, dataElement[0].long] - map.panTo(selectedCoords) + map.setView(selectedCoords, 14) }) // so that the first map and info that loads