Skip to content

Commit

Permalink
fix zoom, add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessica Lord committed Mar 29, 2015
1 parent 6605cc4 commit a0c132e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,11 @@ <h2>{{name}}</h2>
})
// 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")
Expand All @@ -167,7 +168,7 @@ <h2>{{name}}</h2>
$('#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
Expand Down

0 comments on commit a0c132e

Please sign in to comment.