From 8c65460501b5528c6aeb02abfd8ab824c991e235 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Sat, 28 Mar 2015 23:05:21 -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 @@ }) // 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 @@ $('#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