Skip to content

Commit a0c132e

Browse files
author
Jessica Lord
committedMar 29, 2015
fix zoom, add todo
1 parent 6605cc4 commit a0c132e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎index.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,11 @@ <h2>{{name}}</h2>
152152
})
153153
// set it and pan to it
154154
$('#latestSpot').html(latestSpot)
155-
map.panTo([theLatestSpot.lat, theLatestSpot.long])
155+
map.setView([theLatestSpot.lat, theLatestSpot.long], 14)
156156

157157
// when someone clicks on a row, highlight it and
158158
// re-center the map
159+
// TODO show popup, change marker color
159160
$('.spotRow').live("click", function(event) {
160161
$('.spotRow').removeClass("selectedRow")
161162
var rowNumber = $(this).closest("tr").attr("id")
@@ -167,7 +168,7 @@ <h2>{{name}}</h2>
167168
$('#latestSpot').css("display", "none")
168169
$('#selectedSpot').html(selectedSpot).css("display", "inline")
169170
var selectedCoords = [dataElement[0].lat, dataElement[0].long]
170-
map.panTo(selectedCoords)
171+
map.setView(selectedCoords, 14)
171172
})
172173

173174
// so that the first map and info that loads

0 commit comments

Comments
 (0)
Please sign in to comment.