Skip Navigation

[Resolved] Map Issues

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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by Pete 1 year, 11 months ago.

Assisted by: Shane.

Author
Posts
#2374491

Hi there,

We need to hide a map in 'something' for mobile users. Essentially a map on desktop is always visible. for mobile it's hidden giving someone the choice to use it or not.

If we add the map code to a modal, it breaks the fit bounds on.

If we add it to a JQuery option we hit an different issue.
See for example purpose:
hidden link

Click View map (top left)
This isn't working because we have added to the container div display:none;

This so the starting point, the container is hidden and when the button clicked, it shows.

If we remove display:none; the map works great however it's not hidden to start with.

Seems no matter whether we add a map short code to a modal, tab or now JQ something always breaks it.

Any ideas on how we over come this please?

Thank you.

#2374533

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pete,

Thank you for getting in touch.

Have you tried adding the map to an accordion ? For instance it will be a toggle, so the user can click a button to toggle on/off the section that contains the map.

Please let me know what you think of this idea.

Thanks.
Shane

#2374541

Hey Shane,

we have tried it in all kinds, from when we used Elementor to Kadence....adding the map to anything nested busts the 'fit bounds on'.

This more an issue now as we have a newer site covering parts of Europe....here we need to use fit bounds on, this works fine on the desktop version of the map, the mobile version in anything where we hide it breaks.

Currently this page has a popup version of the map, resize your browser and you'll see the map search appear just under the search bar.

It's been an issue for years.

#2374701

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pete,

Given such a case the only other thing I can think of is to hide the map with a conditional and then show it when the search is performed.

This would require that the URL parameters be used since we are essentially checking if a specific parameter is filled out.

Please let me know if you want to try this method. The problem with this is that the map will always be displayed once the search is performed.

Thanks,
Shane

#2375145

Issue not resolved, we'll work around this. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.