Jump to content

Map block behaviour on mobile - extends beyond the block

Go to solution Solved by Ziggy,

Recommended Posts

Posted

Site URL: https://begonia-beige-w8gf.squarespace.com

I have been knocking my head against this problem for a while now and all of the other recommendations and code snippets I have found in the forums don't seem to solve my issue. 

I am using the advanced map block and when I set the size of the block on desktop, moving across to mobile seems to maintain the height from the desktop. Any adjustments to the height of the block on mobile has no impact on the map.

This behaviour is even evident in edit mode where we can see the map extending beyond the bounds of the block.

So first question, how can I control the height of the map on mobile if not with the block height itself?

Second question, is there anything we can do to ensure when the map size is adjusted for mobile the "fit bounds" setting is maintained ensuring all pins remain visible in the new reduced size viewport on mobile?

Any help would be greatly appreciated.

 

Posted
11 minutes ago, Todaybreak said:

What's your site wide password?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

I can't replicate the problem, but you could try hiding the overflow with CSS:

section[data-section-id="674565cb7ae2d20164cbe28a"] {
  overflow: hidden;
}

 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

Here you can see the desktop and then the mobile with the map block selected. See how the map extends beyond the block size? And it is this larger extended size that is displayed in browser, not the reduced height block as I want it.


image.thumb.png.abf235d72e92c85fffd05174f49c8b6a.pngimage.thumb.png.c0561bf5d65ce6744ef03d5e7d59e9c8.png

Posted

Your solution simply hides the map that is extending beyond the section but does not resize the map. So we are losing valuable information. We need to be able to specify a height of the map itself so we don't lose content in the overflow.

 

Posted (edited)

I do appreciate the assistance however, I just think we are targeting the wrong issue. I would like to be able to specify the height of the map, not simply clip the content. This is evident in the loss of the google logo and northern states of America in the map.

Screenshot 2024-11-26 at 7.20.20 PM.png

Edited by Todaybreak
Posted
2 minutes ago, Todaybreak said:

I do appreciate the assistance however, I just think we are targeting the wrong issue.

Agreed, as I said I couldn't identify the issue when I looked, so I took a punt.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

You're using the Square Websites plugin, correct?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

Strange, it should resize automatically.

Have you tried asking in their dedicated Slack support channel?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

This code is causing the problem:

image.thumb.png.e4cb6aee7c0460052a4ac463ce54731d.png

Having a min-height set in CSS is stopping you from being able to resize the map natively.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted
3 minutes ago, Todaybreak said:

Is this code accessible for me to edit directly and remove the min height limitation?

I would guess this was in your Custom CSS, I don't think it's a standard feature in the plugin.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted

No I have not added that, the css I have added is super minimal. Only a couple of overlays and some text styling. How would I determine its source then. 

 

image.thumb.png.b7ac51ba904789f378c7d67b444ff79f.png

  • Solution
Posted

You could probably override it with this in Custom CSS:

.custom-map-block {
  min-height: 0vh !important;
}

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Posted
1 minute ago, Todaybreak said:

Sir you are a genius. That worked perfectly. Thank you very much for both your time and skills mate.

Happy to help! Can you mark my post as the solution and give it a like? Thanks!

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.