/**
* Custom getLocations method so we can check for our own locally cached
- * geodata first. We can't implement our own GGeocodeCache becuase we want
- * to allow a per-user override of an individual image, not a general cache
- * of lat/lng => location text.
+ * geodata first.
*/
getLocations: function(p) {
if (p.image_data.image_location.length > 0) {
// Cache the location locally?
if (update) {
- new Ajax.Request(this.options['updateEndpoint'],
+ new Ajax.Request(this.options['updateEndpoint'] + "/action=location/post=values",
{
method: 'post',
- parameters: {
- type: 'location',
- location: encodeURIComponent(place.address),
- img: image_data.image_id
- }
+ parameters: { "values": "location=" + encodeURIComponent(place.address) + "/img=" + image_data.image_id }
}
);
}
include_once dirname(__FILE__) . '/../../base.php';
$type = $args['action'];
- $location = empty($post['location']) ? '' : $post['location'];
+ $location = empty($post['location']) ? null : $post['location'];
+ $lat = empty($post['lat']) ? null : $post['lat'];
+ $lng = empty($post['lng']) ? null : $post['lng'];
$img = $post['img'];
- $lat = $post['lat'];
- $lng = $post['lng'];
if (empty($img) ||
($type == 'location' && empty($location)) ||