Open Street Maps: Exposing Latitude, Longitude, Zoom Level
Support › MB Geolocation › Open Street Maps: Exposing Latitude, Longitude, Zoom LevelResolved
- This topic has 7 replies, 3 voices, and was last updated 4 years ago by
Long Nguyen.
-
AuthorPosts
-
January 6, 2021 at 5:52 PM #23863
Mauro
ParticipantHello Anh,
Following up to this conversation from 2 years ago, I need to expose Lat, Lon and Zoom level from the OMS map so that content managers can fine tune this or paste the coordinates from a different source.I tried with a similar code but it's not working.
Can you help?array( 'type' => 'text', 'name' => 'Address', 'id' => 'address', 'desc' => 'Use this field to autocomplete the address and add the coordinates automatically.', ), array( 'id' => 'location', 'type' => 'osm', 'name' => 'Location', 'address_field' => 'address', 'language' => 'en', 'desc' => 'You can click on "find address" below the map to update the pin location on the map. Fill the address field above to update the coordinates.', ), array( 'type' => 'text', 'name' => 'Latitude', 'id' => 'latitude', 'binding' => 'lat' // lat,lng ), array( 'type' => 'text', 'name' => 'Longitude', 'id' => 'longitude', 'binding' => 'lng' // lat,lng ),
February 21, 2021 at 8:57 PM #24518Long Nguyen
ModeratorHi Mauro,
Please update the newest version of MB Geolocation v1.3.1 to make it works. Get the sample case here https://github.com/wpmetabox/meta-box-geolocation/blob/master/tests/osm.php.
April 8, 2021 at 3:35 PM #27049Ulysse
ParticipantHello,
I try to do the same thing, but with the Metabox vuilder.
My issue is, that I don't see how to autopopuluate country, city...If I take the example of this code:
[
'type' => 'text',
'name' => 'Country',
'id' => 'country',
'address_field' => 'address6',I cannot do that in the metaboxbuilder? https://prnt.sc/1176ubw
April 8, 2021 at 6:58 PM #27056Long Nguyen
ModeratorHi Ulysse,
Please take a look at my screen record to know how to use MB Geolocation with Builder https://share.getcloudapp.com/p9ub7Jln.
Get more details on the documentation
https://docs.metabox.io/extensions/meta-box-geolocation/#multiple-autocomplete-addresses
https://docs.metabox.io/extensions/meta-box-builder/#custom-settingsApril 8, 2021 at 8:53 PM #27064Ulysse
ParticipantThank you very much. It works.
I was able to extract the country (country_agent) from the adress (adress_agent).
For the same custom post, I have created a custom category that I called 'Location of the Agent".
I would like to populate the category with the country_agent I exctracted from the adress_agent.I tried to do it with relationships but I failed. Is tere a way to do that?
April 9, 2021 at 3:28 PM #27085Long Nguyen
ModeratorHi,
It is not possible. The extension only supports populating the data to the field type
text
as in the documentation https://docs.metabox.io/extensions/meta-box-geolocation/#adding-autocomplete-field.April 9, 2021 at 3:45 PM #27089Ulysse
ParticipantHi,
Thank you for your answer.Outside of Geolocation extension, is there a way to "transform" a text field into a category/tag?
April 9, 2021 at 10:37 PM #27100Long Nguyen
ModeratorHi,
I will inform the development team to explore the possibility. Thanks for your feedback.
-
AuthorPosts
- You must be logged in to reply to this topic.