a very simple question I am sure just the brain isn’t working this morning.
I have the folowing code I am using with JQuery and the Google Maps v3 API. I basically am trying to refresh a map with new search results once it has been dragged to a new location.
google.maps.event.addListener(
map, 'dragend', function() {
var newlatlng = map.getCenter();
$('#venue-list-container').load('/maps/geoMap.php?',{latlon: newlatlng});
});
However I can’t find what to use in the parameters after the url to post the newlatlng value (latlon: newlatlng). At the moment it doesn’t work
Use post?
The $.post function calls the PHP script, sending along the coordinates. The PHP script is able to retrieve these coordinates by referring to them within the $_POST array. Like $_POST[‘latitude’]