Skip Navigation

[Resolved] Map markers not displaying on map

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

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 support ticket is created 3 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by davidS-53 3 years, 10 months ago.

Assigned support staff: Luo Yang.

Author
Posts
#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: English (English ) Chinese (Simplified) (简体中文 )

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!