Skip Navigation

[Resolved] How can I save Lat/Long as numeric values in a address field

This thread is resolved. Here is a description of the problem and solution.

Problem:
How can I add specific Latitude and Longitude to my address fields created with Maps Plugin?

Solution:
You can save latitude and logitude in a specific Syntax in the Address Custom Field.

The Syntax has to be:

{lat,long}

Example:

{37.56731737931802,126.98020079790035}

100% of people find this useful.

This support ticket is created 7 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 2 replies, has 2 voices.

Last updated by Helmi 7 years, 8 months ago.

Assisted by: Beda.

Author
Posts
#428709

Hey there,

we're using Types/Views/Layouts to build a link directory where users can enter their sites. We're also adding a location field so users can enter their address and save a location for their sites.

We already hacve some existing data from an old script that we are currently trying to import. This data partly contains lat and lon coordinates for existing sites that we want to import. Unfortunately after adding a maps field we saw that only the address the user enters is saved in a custom field. Is it possible to also have lat/lon stored parallel and so be able to import the old data?

We are using WP All Import to import the data btw.

Frank

#429148

You can save latitude and logitude in a specific Syntax in the Address Custom Field.

The Syntax has to be:
{lat,long}
Example:
{37.56731737931802,126.98020079790035}

You can format your Import File with above syntax and populate the Address Field with it.

#429154

Ah great,

so this means this syntax can go alternatively to the adress? That is good to know. Thanks.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.