Skip Navigation

[Resolved] Extra digits to longitude causing pin to not show on map

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

Problem: When I try to save a post with a custom address field, extra digits are added to the longitude number. This causes the marker not to appear on the map. If I edit the number to remove the extra digits, the text address is no longer displayed.

Solution: In this case, an API key restriction seems to be the cause of the problem. Update your maps API key restrictions and clear your cached addresses in Toolset > Settings > Maps.

Relevant Documentation:
https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps/

This support ticket is created 5 years, 10 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)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by stephenG-3 5 years, 10 months ago.

Assisted by: Christian Cox.

Author
Posts
#1186141
screenshot-ultimatesolar.co-2019.01.17-16-43-30.png

I am trying to:

Get businesses to show up as pins on the map

Link to a page where the issue can be seen:

hidden link

I expected to see:

Two pins to show up

Instead, I got:

One pin

The reason for this is if I type the address in after saving the post the Longitude field has 7 extra digits at the end. If I delete these 7 extra digits and save, the pin now shows up on the map, however the human readable address turns into co-ordinates in the address field. This is the problem.

The one pin that is working I've deleted the extra digits. The problem is then the human readable address is replaced with lat and long numbers.

Screenshot : hidden link

note : it appears someone else was having the same issue but the ticket wasn't marked as resolved
https://toolset.com/forums/topic/help-show-multiple-markers-on-a-map/#post-493071

#1186194

Hi, can you go to Toolset > Settings > Maps and click the "Check API" button? When I test, I see an error message:

REQUEST_DENIED - API keys with referer restrictions cannot be used with this API.

I temporarily switched to my own API key, and I was able to save the same address in this post:
hidden link
You can see that the extra digits are no longer appearing.

Also I see results appearing now here: hidden link

I'm switching back to your API key for now, but it appears to be misconfigured. You'll need to check those configurations in the Google Maps console.

#1186202

Very good Christian. I've made a new Google Maps API Key this time without the security restrictions Google suggests setting up when you make the key. I clicked the 'Check API' button in Toolset -> Settings -> Maps tab and it's reported as working successful. I checked the map and all the pins are showing. I also check the longitude and latitude and the extra digits are no longer being added to the address custom field after saving the post. Very good. Thank you.

[SOLVED]

#1186204

My issue is resolved now. Thank you!