javascript - Pass var through JQuery load -
A very simple question I'm sure the brain is not working this morning.
I have been using with JQuery and Google Maps v3 API. I'm basically trying to refresh a map with new search results when it has been dragged to a new location.
google.maps.event.addListener (map, 'dendend', function) (var newlatlng = map.getCenter (); $ ('# venue-list-container') Load (' /maps/geoMap.php?'-, {latlon: newlatlng});});
However, what should I use in the parameters after posting the URL Newlatlag (Lotlan: Newlat). At the moment it does not work
Use the post?
Var lat = newlatlng.lat (); Var lng = newlatlng.lng (); $ ('# Venue-list-container'). Post ('/ maps / geoMap.php?', {Latitude: latitude, latitude: lng});
The $ .post function calls the PHP script, sending it with coordinates. PHP scripts are able to retrieve these coordinates by referring them to the $ _POST array. ['Latitude'] like $ _POST
Comments
Post a Comment