Viewing 1 replies (of 1 total)
  • Hello,
    You can use following codes for map center

    add_filter(‘wpgmp_map_options’,’update_center_location’,1,2);
    function update_center_location($map_options,$map_id) {
    //modify map’s center location.
    if(is_single()) {
    global $post;
    $meta_fields = get_post_meta($post->ID);
    $map_options[‘center_lat’] = $meta_fields[‘_wpgmp_metabox_latitude’];
    $map_options[‘center_lng’] = $meta_fields[‘_wpgmp_metabox_longitude’];
    return $map_options;
    }
    return $map_options;
    }
    You have to put this codes in functions.php of your currently activated theme.
    Please try this and let me know.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Pro Version Center Map’ is closed to new replies.