Skip Navigation

[Resolved] Adding a Map block (alongside a View)

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 8 replies, has 2 voices.

Last updated by JoshuaD7497 1 year, 8 months ago.

Assisted by: Minesh.

Author
Posts
#2567807

Tell us what you are trying to do?
I have a WordPress page which presents cottages in a View.
I want to add a Map block underneath showing the geographical locations of the cottages in the View.

Is there any documentation that you are following?
https://toolset.com/lesson-placement/lesson-placements-1622939-1620853/

The problem page is hidden link

When I add the Map block and choose the appropriate settings, the map I want to see (with the markers too) flashes up for a second and then goes blank (white). When viewed on the front end, you just see a default map centred on West Africa.

I have followed the instructions and am using valid API keys. Other maps on this website display fine. And if I change this map to point to a single location, it's fine.

One other weird thing: When you click the 'Field' dropdown to select the custom field that contains the address ('Map Location'), there are actually two options, both called 'Map Location'. This seems odd?

This is a draft website under development and I'm happy to provide access so you can examine it yourself.

Thanks,
Josh.

#2568077

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

To me it seems you do not have registered the proper google map API key but to ensure that can you please send me admin access details and let me review that whats going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2568199

NB - PLEASE ensure you specify the folder as staging_html if using FTP, otherwise you'll be accessing their live website.

#2568223

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I checked but I do not see any other obvious reason. I see there is another google map block it seems it belongs to another plugin.

In order to minimize the cause of the issue and to ensure there ins no conflict between the third-party plugins or theme:
Could you please try to resolve your issue by deactivating all third-party plugins as well as the default theme to check for any possible conflicts with any of the plugins or themes?
-Do you see any difference?

#2568249

Hi Minesh.

It's a mystery...

I changed the theme over to the default 2022 WordPress theme and deactivated every plug-in but still had the same problem.

I noticed that an old page on the website which used the older Views method (pre-blocks) for adding a map was still working - see hidden link

So it seems like the old Views approach still works but the new Map block won't. This is disappointing but I would be prepared to use the older Views method if this is the only viable method which works. Is there any reason not to do this? Will this older method continue to be supported?

I've just added the old type view to the page and as you can see, this works OK.
hidden link

So what do you think? Is this a viable way forward without any drawbacks? I don't mind using this approach provided it remains supported. When I go to Views, I can see there is a duplicate option for every view, so I can use this for the other regional pages.

If I use this older method, is there a way I can customise the map marker to match the orange marker type (with a house), which I've used on the Cottages single pages (e.g. hidden link)?

This is the code used by the old type View:

[wpv-layout-start]
[wpv-items-found]
[wpv-map-render map_id="cromer-map" map_height="500px" general_zoom="10" single_zoom="11"][/wpv-map-render]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-map-marker map_id='cromer-map' marker_id='cromer-marker' marker_field='wpcf-google-map-location']
<h4>[wpv-post-link]</h4>[/wpv-map-marker]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

#2568253

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

That is really strange. I do not see any other user reporting such issue. Maybe this is specific to your site.

if you are really ok then you can go ahead and use the classic views as well there is no harm using that and you can close this ticket.

But if you really want me to check what is the cause of the issue I will require duplicator copy of your site to check further whats going wrong with your setup.

Can you please send me duplicator copy of your site.
- https://toolset.com/faq/provide-supporters-copy-site/

I have set the next reply to private which means only you and I have access to it.

#2568271

Hi Minesh,

To save time, as I'm pushed for time, I'm happy to use the old Views method for now. I could always investigate this another time when I have more time and then I would provide you with the duplicator files.

But if you see no issue in me using the old Views method, that's fine. I just don't want to suddenly be informed that support for this older approach will dropped.

The only snag is that I would like to use a different map marker, the same as I use on the Cottages single pages (e.g. hidden link)?

Is there a method for me to do this?

#2568285

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - you can use the different marker image.

When you try to add the marker Using "Fields and Views" button, with marker popup you will see a tab "Marker icon" where you can select the different marker icon.

#2568289

Thanks Minesh,

I added a dummy marker to see what the code was and adjusted my original marker accordingly which now uses the custom marker.

Like I said, I'll use this old Map view approach for now in this case and maybe I'll investigate it again in the future.

Thanks for your help,
Josh.