Support Forum
Support › Meta Box AIO › Map Field not workingResolved
I created a google field and added my google api
It works but does not save anything.
I also made sure to add a text field that is mapped to the google field such as described in the doc:
https://docs.metabox.io/fields/map/
The Code that AIO generates is this:
'fields' => [
[
'id' => $prefix . 'some_random_field',
'type' => 'text',
'name' => esc_html__( 'Saved Natively Text', 'text-domain' ),
],
[
'id' => $prefix . 'map_field',
'type' => 'map',
'name' => esc_html__( 'Map', 'text-domain' ),
'address_field' => 'address',
'api_key' => 'SECRET',
],
[
'id' => $prefix . 'address',
'type' => 'text',
'name' => esc_html__( 'Text Field', 'text-domain' ),
],
],
I use AIO so there is no code in the theme
But just to be sure I also tried to add it in the theme, which still does not save the address or anything similar to what I see
Strange enough - this works
https://docs.metabox.io/extensions/meta-box-geolocation/
Hi,
Please try to deactivate all plugins except Meta Box, MB extensions and switch to the default theme of WordPress (Twenty Twenty One) then check this issue again.
Follow the step Debugging Information to debug this issue. If it does not show anything, please do the step Private Website Info https://support.metabox.io/topic/how-to-create-a-new-topic/.
I found the "issue"
It actually saves the data, but in the backend, in the map, it defaults still to Dublin after saving.
Is this expected?
I use only Metabox here.
Hi,
Please share your admin site account via this contact form https://metabox.io/contact/. I will check it out.
Hi, thanks!
I have shared the access details in the link/
I also added explanation to the message how to find the issue.
I found that this is an issue that was mentioned once here already https://support.metabox.io/topic/map-field-not-working/
Thanks!
Hi,
I've tested the Google Map field with my API key on your site but not see any issue, screen record https://share.getcloudapp.com/DOuoOJ7P.
I confirm that with a valid Google Maps API, the backend also works.
Interesting is, that the lat and long are saved as well without valid API Key but then the backend won't reflect the saved settings.
Issue's resolved for the Google Map field, but it persists in the OSM Map, but is resolved when we map a address field to it.
I guess with that we can close this ticket.
Thanks!
I have the same issue. And re-assigning address field doesn't work. Any solution for that?