• Resolved beefi1123

    (@beefi1123)


    Is there a way to resize single event maps on mobile? As of now, the left side of any maps just get cut off the screen. I still want to have a larger map on desktop/tablet.

    Also, if this is or isn’t possible, could I completely disable those maps on mobile? They take a while to load and anyone using their phone doesn’t want to wait for a map to load when they can just link to the location.

Viewing 1 replies (of 1 total)
  • logolessllc

    (@logolessllc)

    What I do is a CSS Media Query and have the map display only on screens above 600px.

    Then I have created a custom attribute “google-maps-url” where I put/hold the map url. (something you’ll need to add manually for each event)

    Then in the formatting tab for Settings>Formatting>Events, I’ve placed this HTML:

    <a href="#_ATT{google-maps-url}" target="_blank" alt="Link to Google Maps" id="google-map-link">View On Google Maps</a>

    Then, included in the Media Query I have (for the #ID I created: “google-map-link”):

    @media screen and (max-width: 600px)	{
    
    div.display-map	{
    		display:none;
    }
    
    #google-map-link	{
    	display:inline;
    		font-size:80%;
    	}
    }

    Of, course you need to make it not show up when >600px, so in your default CSS place this:

    #google-map-link	{
    	display:none;
    }

    And, for the default CSS for the map itself (my styling/layout with limited width and float:right; Your style needs will likely differ) The “display” property is what you need to make it show by default:

    div.display-map	{
    	float: right;
    	margin: 0 0 .6em .6em;
    	max-width:60vw;
    	display:inline-block;
    }

    I hope this helps.

Viewing 1 replies (of 1 total)
  • The topic ‘Resize event maps on mobile’ is closed to new replies.