Skip Navigation

[Résolu] Map markers not displaying on map

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:

Google map dose not display correctly, none of the markers are there.

Solution:

Dashboard-> Toolset-> Settings-> Maps

Please fill the second Google API key into box "2nd key for server-side requests", and test again.

Relevant Documentation:

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

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.

This topic contains 2 réponses, has 2 voix.

Last updated by davidS-53 Il y a 2 années et 6 mois.

Assigned support staff: Luo Yang.

Auteur
Publications
#1213507
2019-03-13 14_00_15-Edit Stockist ‹ Pestoff — WordPress.png

I am trying to: Display map markers on a page using a view.

I can add the address fine in the backend. Post type is called Stockists, and the view is called "Homepage View Stockists"- you can see it on the homepage, but none of the markers are there. I've also added a map/marker to the template for stockists, and it doesn't display there either.

Checked for JS errors- none displayed in console. API key all appears to be set up, have enabled all the relevant map/places/geolocate/ etc APIs

Any ideas what I'm doing wrong?

#1213569

Luo Yang
Supporter

Languages: Anglais (English ) Chinois simplifié (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

markers.JPG

Hello,

Thanks for the details, I can login into your website and see the problem, there are two issues:
1) In the post view "Homepage View Stockists":
hidden link
section "Loop item in Homepage View Stockists", you are using below codes:

[wpv-map-marker map_id='map-1' marker_id='marker-1' marker_field='wpcf-stockist-address'][/wpv-map-marker]

It should be:

[wpv-map-marker map_id='map-1' marker_id='marker-[wpv-post-id]' marker_field='wpcf-stockist-address'][/wpv-map-marker]

Each marker should use an unique ID: marker-[wpv-post-id]

2) Dashboard-> Toolset-> Settings-> Maps
Please fill the second Google API key into box "2nd key for server-side requests"

And test again, I have tested it in your website, it works fine, see screenshot markers.JPG

More help:
https://toolset.com/documentation/user-guides/display-on-google-maps/creating-a-google-maps-api-key/

#1214022

Sorry, my bad. Been years since I set up a map & didn't spot that detail in the docs. Cheers!