Google-Maps-for-Rails icon indicating copy to clipboard operation
Google-Maps-for-Rails copied to clipboard

How to make responsive map?

Open Jatapiaro opened this issue 8 years ago • 1 comments
trafficstars

Jatapiaro avatar May 05 '17 20:05 Jatapiaro

Solved, just put your map inside a div.

<div id="map-container">
	<div id="map"></div>
</div>

Then add the following .css

<style type="text/css">
	#map-container {
	  padding: 6px;
	  border-width: 1px;
	  border-style: solid;
	  border-color: #ccc #ccc #999 #ccc;
	  -webkit-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px;
	  -moz-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px;
	  box-shadow: rgba(64, 64, 64, 0.1) 0 2px 5px;
	//  width: 500px;
	}
	#map {
	//  width: 500px;
	    height: 500px;
	}
</style>

Jatapiaro avatar May 15 '17 07:05 Jatapiaro