Posts Locator Function – Not working
-
Hello,
I can not get the “Posts Locator Function”
gmw_update_post_location( $post_id, $address );
work with the Google Maps API Key. I followed your instruction https://docs.gravitygeolocation.com/article/134-how-to-create-browser-and-server-google-maps-api-keys to create 2 Keys, browser and server key.
It does not work/update.
When I use LeafLet it works fine. Even if I update with an Address string or an lat/lng array.So it must be something with the google API. And, I cant even find your TESTING Tab for checking if the API works ??
I am Using the WPUF pro. And I use this funuction:
function update_GEOmyWP( $post_id ) { // make sure post ID exists. if ( ! $post_id ) { return; } // verify the updater function. if ( ! function_exists( 'gmw_update_post_location' ) ) { return; } if ( isset( $_POST['aufnahmeort'] ) ) { list( $adresse, $lat, $lng ) = explode( '||', $_POST['aufnahmeort'] ); $location = array( $lat, $lng ); if ( $adresse ) { update_post_meta( $post_id, 'newADDRESS', $adresse ); } if ( $lat ) { update_post_meta( $post_id, 'newLAT', $lat ); } if ( $lng ) { update_post_meta( $post_id, 'newLONG', $lng ); } gmw_update_post_location( $post_id, $location ); } } add_action( 'wpuf_add_post_after_insert', 'update_GEOmyWP' ); add_action( 'wpuf_edit_post_after_update', 'update_GEOmyWP' );
Please help ??
Cheers,
Denis
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Posts Locator Function – Not working’ is closed to new replies.