mustardBees / cmb_field_map

Google Maps field type for Custom Metaboxes and Fields for WordPress
120 stars 49 forks source link

API Key Is required? #48

Closed jdgwf closed 2 years ago

jdgwf commented 8 years ago

API Key Is required in our instance. I was able to fix this by hardcoding the API key in the Google Maps script enqueue. It might behooves to add this as an option or setting in the admin :)

phh commented 7 years ago

While we wait for this to get merged in here is a little filter that might help you:

add_filter( 'cmb2_render_pw_map', function() {
    wp_deregister_script( 'pw-google-maps-api' );
    wp_register_script( 'pw-google-maps-api', '//maps.googleapis.com/maps/api/js?libraries=places&key=<API-KEY>', null, null );
}, 12 );
rasmustaarnby commented 6 years ago

This is now possible. See #58

jdgwf commented 2 years ago

Closing ancient issue.