I'm not sure what it is that I am doing wrong here. When I open the HTML code for it, it just crashes. Does anyone have any idea if my syntax is wrong, or I'm just fundamentally not understanding how the BBQ plugin works? Thanks so much!
$.bbq.pushState({
lat: pointArray[0][0].lat(),
lng: pointArray[0][0].lng()
});
$(window).bind('hashchange', function(e) {
var searchParams= e.getState();
pointArray[0][0] = new google.maps.LatLng(searchParams.lat, searchParams.lng);
mapSearch();
});
$(window).trigger('hashchange');
In Chrome, it says that I am calling method pushState
of undefined
. Am I suppose to declare lat
/lng
outside before?