[Google Maps] How to set the height and the width of the map?

[Google Maps] How to set the height and the width of the map?

  
Forge Component
(14)
Published on 4 Oct by OutSystems Labs
14 votes
Published on 4 Oct by OutSystems Labs
Hello,

Can you tell me how to set the height and the width of te map.
I have placed the map in a container and the width is nou the width of the container.

But the height is always the same.

How can I change this?

Thanks for your support!

You can change the height in the height property of the GoogleStaticMap Web Block. Select the Web Block and set the Height property as "300", for instance.
You can also override the GoogleMap class css settings like this, on the page css if you want your maps different settings on each page for instance. Hover on the style sheet to see all the settings.

/* override GoogleMap settings */
.MapPlaceHolder {
    min-height: 200px;
}
Thanks for the fast replies, it works!
Hi,

I do not have the height property. The resizable property has the no value but I can not change it.

How to fix this?

If you're goal is just to have a flat static map in your application, you should use the "GoogleStaticMapsAPI" (not that one you're using) and drag the GoogleStaticMap Web Block inside a container. There you will have the height property where you can define the height of you're map.
Ok thanks
Johan,

In GoogleMaps hover on the StyleSheet property for the kind of Map that you are using and you will see the CSS that is controliing the size of the map. (see picture). You can override any of these properties by adding a style sheet to your page that the Map is on, as in my previous post.

.MapPlaceHolder {
   min-height: 200px;
  min-width: 80px;
}

Will make it smaller etc., 

Keith