Navigation überspringen

[Gelöst] Marker displays fine in one view instance, not in other

This support ticket is created vor 6 Jahren, 3 Monaten. 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Alexander von Freeden vor 6 Jahren, 3 Monaten.

Assistiert von: Nigel.

Author
Artikel
#1122334

I am trying to:
I set up an address custom field for my CPT and I am trying to display that adress on a Google Map on the frontend.
It works just fine in one post but the map is empty in another post that is from the same CPT.
Additonally weird: In the post editor, when I enter the address, the marker is visible on the right spot every time.

Link to a page where the issue can be seen:
versteckter Link
Go to "Trainers" and check the first post "Malwina F." where it is working fine. And then check "Raymond Chan" where it is not working.

I expected to see:
A marker on a google map pinned to an adress from the Address cutom field

Instead, I got:
Empty maps in standard position

Thanks in advance!

#1122689

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+00:00)

Hi Alexander

Although it is working in some cases but not others, the most likely explanation is a problem with the API key and, specifically, the URL referrer restrictions.

First, I would test this editing the Google API key and removing any URL referrer restrictions.

I expect that the issue will then disappear if you re-test.

In which case you can add two API keys, the first with a URL referrer restriction for exposed client-based requests, and a second key with no URL referrer restrictions for unexposed server-based requests.

See https://toolset.com/documentation/user-guides/display-on-google-maps/creating-a-google-maps-api-key/#known-issues

If this doesn't help at all, let me know.

#1122758

Thanks, I tinkered around with the API, now its working. Will probably add a 2nd key once the site is in production. Cheers!