Skip Navigation

[Resolved] Not All Pins Are Appearing on Map

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

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.

Our next available supporter will start replying to tickets in about 4.92 hours from now. Thank you for your understanding.

This topic contains 6 replies, has 2 voices.

Last updated by marcusC-4 5 years, 2 months ago.

Assigned support staff: Beda.

Author
Posts
#427239

I have setup a new View to display neighborhoods on a map. Neighborhoods is a CPT with a custom "address" field. The map renders well & shows 20 pins, but there are many more that should be shown that are not.

In the loop, I have added the Post Title & Address fields for the neighborhoods so you can see all of the neighborhoods listed beneath the map. Every one of these should also be added as a pin/marker on the map but for some reason, they are not.

Here is the URL of a page I setup to test the map: hidden link

Here is the code from the loop:

[wpv-layout-start]
	[wpv-items-found]

		[wpv-map-render map_id='map-3' map_height='500px' single_zoom='10' cluster='on' marker_icon='<em><u>hidden link</u></em>' cluster_min_size='5']
	<!-- wpv-loop-start -->
		<wpv-loop>
          		[wpv-post-title]
		[types field='neighborhood-address-n'][/types]
          
          [wpv-map-marker map_id='map-3' marker_id='marker-[wpv-post-id]' marker_field='wpcf-neighborhood-address-n']
                [wpv-post-body view_template="Part - Marker Info PopUp for All Neighborhoods"]
          [/wpv-map-marker]
		</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
[wpv-layout-end]

There are no filters. Neighborhoods is selected in the Content Selection area. I have verified all field slugs. I’m not sure how to get the rest of the neighborhoods to show up on the map. Any advice or something else I should troubleshoot?

Thanks,

Marcus

#427343

There is a JS Error on the console, related to the map cache.

1. Do you have set up a Google API Key?
It could be related, given that only some pins are appearing.

2. May I get access to the system to test our own API Key?
(Please use the private reply in case I can do that)

3. Do the "not showing" pins have any pattern? Like Post Date (after certain date) or certain Fields/Taxonomies?

4. Dumb quesion, but is the issue also present with with a WordPress Default Theme and NO Plugins BUT the Toolset Plugins?

If not, could you then re-enable the Plugins one after the other, and check the issue each time you enable a plugin?
Please report me when the issue comes back
It might also be due to the Theme.
Please do reactivate your Theme only after you are sure the issue isn't coming form a 3rd Party Plugin.

5. Is this issue new, or happening since the very begin when you used maps?
In other words, when did you first notice that not all posts appear?

#427847

1. I went in & cleared the map cache & now none of my maps work on the test site.

That is basically all I need to know, and confirms what I suspected.

Your Google API is not set up correctly.

It had the previous Pins in the cache but did not add any new ones.

The Solution is within this steps:

Please ensure that you followed this DOC exactly:
https://toolset.com/documentation/user-guides/display-on-google-maps

1. Create an Address Field with Types Plugin
2. Add Addresses to your Posts
3. Insert the Map and markers to a View or your Post (directly, do not use Layouts, for debug purposes)
4. call the View on a page or view your Post.

==> Very important is to know, that Google did change its API rules.

==> You now NEED an API key and here is described how that API must be set up:
https://toolset.com/documentation/user-guides/display-on-google-maps > Creating a Google Maps API Key

==> I would "overkill" it a bit and delete the current API, so to create a new one.

==> Also, wildcard URL restricting of the API, or any other form of restriction of the API, is tricky.
Please try first without restrictions, in case it still does not work.

If then all this did not solve the problem, please check if the issue also persist with a WordPress Default Theme and NO Plugins BUT the Toolset Plugins?

3. I am 100% sure it will be solved with our own API, speak with a properly set up API key, but, I can not test it, you submitted me Log In details to another Webstie, not related to the forst one.

4. Please also aknowledge that Google only allows your site to convert 10 addresses to coordinates per second (API yes or no).
If you delete too many addresses, the maps on your site may take several page refreshes to display correctly.
Google doesn't like it when sites call the address resolution too often.

The only what I can now do, is to show you that it works with our API, but I would need the logins to that site you linked to in the first post

#429119

I can not access your Front end even if logged in and using the Admin Password you provided.

It shows me a login form and a "Password protected Site"

Once I have the link to the Map and can see it on the Front end I can test our API key.

I suggest to delete the API Key, and create it again with no restrictions (referrers) and test this.
If then it works, carefully introduce the referrer restrictions and check it again.

The DOC for the API is here:
https://toolset.com/documentation/user-guides/display-on-google-maps > Creating a Google Maps API Key

Please also update your Toolset Maps Plugin.

#429935

Our communication is getting all mixed up because I started off by asking about live site (pinkrealty.com) and switched to give you access to test everything on a test site (pinkrealty.csocially.com) so that my client’s live site doesn’t get jacked up while we figure out what’s wrong.

I put the password to view the site in a previous private message to you. It is MonicaB.

I have already created a new API, enabled the 3 necessary libraries, and added the API key to the plugin. The API clearly works because in my developers console I can see where successful requests are made to the JS & Places libraries. They each have 100% success rates. My problem is with the Geocoding library, which has a 100% error rate.

I am not sure what else to do to test this. The API requests are going through, the map renders, but no address markers. I just setup a new page with nothing on it but the map shortcode & marker shortcode. I used the address for the White House so I know we have a real address -- and I was able to select that address as I typed it, so that API request is working well.

Here are the shortcodes: [wpv-map-render map_id='map-4'][wpv-map-marker map_id='map-4' marker_id='marker-4' address='1600 Pennsylvania Ave NW, Washington, DC, United States'][/wpv-map-marker]

Here is a link to that page: hidden link

I have tested it with no other plugins activated and the 2015 theme & I get the same problems.

I feel like I’m either overlooking something obvious or there is an issue with the plugin integration with the Geocoding API request.

You should now have login info & the password to view the front-end of the site. If you need anything else in order to troubleshoot, let me know.

Thanks,

Marcus

#430001
Bildschirmfoto 2016-08-30 um 14.48.14.png

It is your API that is not working.

I added our own API and the Map Shows fine.
I removed the API again as it's a private API.

We provide all possible documentable details in our Document, but Google, is simply put, impossible.

They do not document how to and why things happen at all.

I suggest to contact them and ask what is wrong.

We set up our API just as written in the Document. We do even restrict referrers when needed, with *.domain.com/*

I can not help with this, the Plugin is working fine and our API too, and we did not follow any special steps.

Most cases are due to wrong referrer restrictions, wrong setup of the Developer Console and wrong set up if the API.

I tell you we get each week around 10 threads like this.
Always, at the end it is due to Google API, and this is the case here as well, as I tested with our and it works.

We do not have any special account or steps. This is a Google Issue.

I will now push our DEV to publish maybe avideo or similar, but see, the problem is simple:
Google does deliberately change UI, GUI, and whatelse, usually without even updating their own DOC.
Creating a Video on our end would mean, by tomorrow it can be outdated again.

Anyway I will ask if this is possible to somehow make easier.

I can not help with it's setup, I know it works if the steps are followed, and I know that if you use Google DEV console you spend more time developing that API Key than developing the actual site.
It is frustrating but I can not change that.

#435923

We finally found the issue. It was a plugin conflict with Simple Real Estate Pack. I don’t know why it didn’t work when I deactivated all plugins & themes -- maybe a server issue at that time.

Anyway, thanks for your help. It’s all cleared up now. Had nothing to do with the API, just a plugin conflict. 🙂

Marcus