angular-google-maps icon indicating copy to clipboard operation
angular-google-maps copied to clipboard

Define height through an attribute in the directive? (not through css)

Open germanger opened this issue 10 years ago • 1 comments

Today, to define the height of the map, one most add this class style:

.angular-google-map-container {
      height: 200px;
}

The problem with this is that it assumes we are using the same height for all the maps in the app.

So... Is it possible to define the height "in situ"? something like this:

<ui-gmap-google-map center="map.center" zoom="map.zoom" height="200"></ui-gmap-google-map>

or maybe this:

<ui-gmap-google-map center="map.center" zoom="map.zoom" style="height: 200px"></ui-gmap-google-map>

germanger avatar Mar 06 '16 02:03 germanger

You can still do it through css? I personally use this:

.mapstyle1 .angular-google-map-container { height: 200px; }

.mapstyle2 .angular-google-map-container { height: 300px; }

wolleysesom avatar Mar 10 '16 00:03 wolleysesom