Skip Navigation

[Resolved] I want to add a popup into window on the google map clusterer icons

This support ticket is created 7 years 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 4 replies, has 2 voices.

Last updated by sharonb 7 years ago.

Assisted by: Beda.

Author
Posts
#597241

Tell us what you are trying to do? create popup info window on google map clusterer icons. I want the window to say that there are X number of Custom Post Types for this location and then add a button link

Is there any documentation that you are following? maps info

Is there a similar example that we can see?

What is the link to your site? hidden link

I have created a test view here: hidden link

and here is a link to the display map hidden link

I want the popup windows to display over each clusterer marker but I am not getting a pop up at all?

I am obviously missing something!

#597341

That is not possible.

Those Marker Pop ups are intended to work on single markers, not clusters.

There is not any possibility with Toolset Maps to add such pop ups to the clusters.
You can only choose what to do when clicking the Cluster Icon (zoom, or not).

If you wish, I can file a feature request for this, to see if we can implement it.

#597345

As a workaround then could I create a map displaying the 16 individual depot locations. In the popup window for each location what code would I need to display the number of custom posts (3 vacancy types) connected the individual location?

EG: EXAMPLE POP UP WINDOW

Depot Location: RUCORN
There are 26 Driver Vacancies at this Location
There are 21 Warehouse Vacancies at this Location
There are 3 Head Office Vacancies at this Location

Also is it possible that the pop up windows are open on page load? or hover or do they only work on mouse click?

Thanks for your help.

And just to clarify is zoom the only option on clicking a clusterer marker or can I link the clusterer to a page url?

#597346

There is only one ShortCode in Toolset that returns an amount of Posts, and that is either wpv-items-count or wpv-found-count.
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-items-count
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-found-count

None accepts an attribute to count only certain items. Both count all the posts.

For your goal you would need Custom Code. The Custom ShortCode should use a get_posts() and count() those items.
Then return the amount, and use this ShortCode in the Pop Up.
Your Custom ShortCode should accept an attribute to pass, where you could use the address or any other "connecting" data to actually match the right posts in your get_posts() function.

This is custom code that we cannot assist.
If you require Custom PHP code help, I can suggest the Contractors:
https://toolset.com/contractors/

All options you have in markers and maps are visible within the GUI.
You cannot link to a custom URL when you click on a Cluster.
Either it will zoom in, or do nothing.

It's also not possible to load the pop ups open by default, within the GUI there is no setting for this.

Please let me know if you agree with the previous mentioned feature request, and I might add another one:
Allow to count posts by a certain attribute with the wpv-items-count or wpv-found-count ShortCodes.

What do you think?

#597347

Thanks Breda,

Yes please submit the above as a feature request and thanks for the advice on the custom coding. If the feature request is developed could you please let me know.

Thanks again for your help, much appreciated.