We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to pass width and height parameters (attributes) for google maps? Preferably by %, but fixed pixels is ok also.
The text was updated successfully, but these errors were encountered:
I inspected the page using Google Chrome inspection tool. In the map area, I found these divs in the body:
<div id="map" class="googlemap" style="position: relative; overflow: hidden; transform: translateZ(0px); background-color: rgb(229, 227, 223);">
<div class="gm-style" style="position: absolute; left: 0px; top: 0px; overflow: hidden; width: 100%; height: 100%; z-index: 0;">
So I figured it out.
You have to wrap the gravstrap g-map shortcode in a div style that defines the height and width. You can do this directly in markdown files. Example:
`
A full example is:
<div class="gm-style" style="position: static; width: 100%; height: 100%; z-index: 0; "> [g-map id=map zoom=12 center="41.90278,12.49637"] [g-map-marker location="41.90278, 12.49637" title="Gravstrap theme"] **Meet Us** We are there! [/g-map-marker] [/g-map] </div>
You can use fixed pixels also like width: 300px;, but width: 70%; seems more appropriate for websites that are dynamic for mobile devices
width: 300px;
width: 70%;
Sorry, something went wrong.
No branches or pull requests
Is there a way to pass width and height parameters (attributes) for google maps? Preferably by %, but fixed pixels is ok also.
The text was updated successfully, but these errors were encountered: