File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -152,10 +152,11 @@ <h2>{{name}}</h2>
152
152
} )
153
153
// set it and pan to it
154
154
$ ( '#latestSpot' ) . html ( latestSpot )
155
- map . panTo ( [ theLatestSpot . lat , theLatestSpot . long ] )
155
+ map . setView ( [ theLatestSpot . lat , theLatestSpot . long ] , 14 )
156
156
157
157
// when someone clicks on a row, highlight it and
158
158
// re-center the map
159
+ // TODO show popup, change marker color
159
160
$ ( '.spotRow' ) . live ( "click" , function ( event ) {
160
161
$ ( '.spotRow' ) . removeClass ( "selectedRow" )
161
162
var rowNumber = $ ( this ) . closest ( "tr" ) . attr ( "id" )
@@ -167,7 +168,7 @@ <h2>{{name}}</h2>
167
168
$ ( '#latestSpot' ) . css ( "display" , "none" )
168
169
$ ( '#selectedSpot' ) . html ( selectedSpot ) . css ( "display" , "inline" )
169
170
var selectedCoords = [ dataElement [ 0 ] . lat , dataElement [ 0 ] . long ]
170
- map . panTo ( selectedCoords )
171
+ map . setView ( selectedCoords , 14 )
171
172
} )
172
173
173
174
// so that the first map and info that loads
You can’t perform that action at this time.
0 commit comments