Hi Chris,
I’m about to deploy a site with several thousand businesses.
When doing mashups of circa 100+ items, is there any advantage in using your function (below) to dump the lats and longs into custom post fields and call from there rather than pulling from the separate MapPress tables (I’m thinking in terms of speed)
Cheers,
Clive
<?php
function myaction($map) {
global $post;
$first_poi = isset($map->pois[0]) ? $map->pois[0] : null;
if ($first_poi) {
$lat = $poi->point['lat'];
$lng = $poi->point['lng'];
update_post_meta($post->ID, 'mylat', $lat);
update_post_meta($post->ID, 'mylng', $lat);
}
}
add_action('mappress_map_save', 'myaction', 10, 2);
?>