

After installation go to WP Admin -> SB Google Map in left navigation. This is a wordpress plugin to generate stunning google maps with 114 styles and counting. Clicking on the link will open google maps in a new tab for directions. Padding-bottom: 75% // This is the aspect ratioĪ similar technique can be used to embed Instagram videos and photos responsively. SB Multilingual Responsive Google Map With Styles and Layers. This is a fully-responsive block that includes a map element and a directions link. You can change the value of padding-bottom (line #4) from 75% to something for a different aspect ratio.
#Google map responsive resize code
The new embed code with responsive style will be something like this. If you wish to transform this static sized Google Map into one that is responsive, all you have to do is add a few CSS rules to your web page and wrap the embed IFRAME inside these rules. This is the default embed code for the new Google Maps: Īs specified in the height and width parameters of the embed code, the default height for medium embeds is 450px or 75% of the default width (600px). Thus, if you resize the browser or view the page on a small device, the embedded map would adjust its size automatically based on your screen size. Here’s another web page that contains the same Google Map but now the map has been embedded responsively.

What it means is if you open the page on a device other than your desktop computer, the Google Map won’t fit the screen and you’ll have to scroll the page horizontally to see the complete map.
#Google map responsive resize how to
This web page contains a sample map embedded using the default embed code provided by Google Maps. HSB vs HSL vs HSV Force table column widths to always be fixed regardless of contents How to undo all added files in Mercurial Measure response time for a HTTP request using Ruby django-storage with s3-boto break browser cache if statement and calling function in if using bash Polygon infill algorithm Linking to another HTML page in Google Apps Script Alembic: How to migrate custom type in a. While you are on the Google Maps website, zoom-in to an area that you wish to embed, click the Gear icon in the lower left corner and choose the Embed Maps option from the menu. It take two easy steps to embed Google Maps in your web pages.

Responsive Google Maps – The maps automatically resize based on the screen size.
