Skip to content

Instantly share code, notes, and snippets.

@pjhoberman
Created March 27, 2012 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pjhoberman/2220021 to your computer and use it in GitHub Desktop.
Save pjhoberman/2220021 to your computer and use it in GitHub Desktop.
row.attr('data-last-lat', user.last_known_loc.lat);
row.attr('data-last-lng', user.last_known_loc.lng);
row.attr('data-marker-index', i);
row.click(function(){
LIVE_MAP.focus($(this).attr('data-last-lat'),$(this).attr('data-last-lng'), $(this).attr('data-marker-index'));
});
//...
LIVE_MAP.focus = function(lat,lng,i){
this.map.setCenter(new google.maps.LatLng(lat,lng));
this.map.setZoom(12);
LIVE_MAP.Markers[i].ib.open(LIVE_MAP.map, LIVE_MAP.Markers[i].marker)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment