Map Field not working
Support › Meta Box AIO › Map Field not workingResolved
- This topic has 7 replies, 3 voices, and was last updated 2 years, 1 month ago by
Igor Jakubowski.
-
AuthorPosts
-
January 15, 2021 at 4:37 PM #24040
Beda Schmid
ParticipantI 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 seeStrange enough - this works
https://docs.metabox.io/extensions/meta-box-geolocation/January 15, 2021 at 9:49 PM #24044Long Nguyen
ModeratorHi,
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/.
January 16, 2021 at 5:24 PM #24054Beda Schmid
ParticipantI 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.
January 16, 2021 at 10:24 PM #24063Long Nguyen
ModeratorHi,
Please share your admin site account via this contact form https://metabox.io/contact/. I will check it out.
January 16, 2021 at 11:06 PM #24066Beda Schmid
ParticipantHi, 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!
January 17, 2021 at 9:15 AM #24068Long Nguyen
ModeratorHi,
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.
January 17, 2021 at 2:32 PM #24069Beda Schmid
ParticipantI 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!
March 23, 2023 at 5:07 AM #41178Igor Jakubowski
ParticipantI have the same issue. And re-assigning address field doesn't work. Any solution for that?
-
AuthorPosts
- You must be logged in to reply to this topic.