Skip Navigation

[Resolved] Map markers with latitude and longitude

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

Problem: I would like to know if I can use latitude and longitude values instead of an address to position a map marker.

Solution: It may be possible to use 3rd party latitude and longitude values to position markers on a map, however, distance-based features require Toolset's address fields.

Relevant Documentation: https://toolset.com/documentation/user-guides/maps-shortcodes/

This support ticket is created 5 years, 3 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by nicolaS-3 5 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#1318473

Hi,
I am considering using Toolset Maps. I am reading your documentation and I see it uses an Address field to position data on maps. Instead of the address, in my post type I have longitude and latitude fields, would it be possible to use those instead of the address ?
thanks
Regards
Nicola

#1318593
Screen Shot 2019-08-18 at 4.20.28 PM.png

Hi, it's possible to use latitude and longitude directly in an address field instead of a text-based address. I'm attaching a screenshot here. One thing to note is that if you use latitude and longitude, no text-based address will be available. When you display the value of this custom field, the latitude and longitude will be displayed instead of a text-based address.

If you're planning to use latitude and longitude from a 3rd-party custom field, then it may or may not be possible to use those values to display markers on Toolset Maps. You would have to be able to access the latitude and longitude individually, as separate values, to apply those values to a map marker shortcode. We have documentation available here: https://toolset.com/documentation/user-guides/maps-shortcodes/

Also please note if you plan to use Toolset Maps distance-based filters or sorting with Views, then you must use Toolset's address fields. Latitude and longitude from third-party fields cannot be used with Toolset's distance-based features. Let me know if you have additional questions about using latitude and longitude with Maps.

#1321863

My issue is resolved now. Thank you!