Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
38
rated 0 times [  42] [ 4]  / answers: 1 / hits: 25312  / 15 Years ago, wed, july 29, 2009, 12:00:00

I have tried to do this in many different ways but the most obvious was this:



var map2 = new GMap2(document.getElementById(map2), {size:100%});


That does not work.


More From » css

 Answers
220

Google says:




Unless you specify a size explicitly for the map using GMapOptions in the constructor, the map implicitly uses the size of the container to size itself.




So set the size of your map container fill all available space:



<div id=map2 style=width: 100%; height: 100%></div>

[#99040] Thursday, July 23, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
karladaijahf

Total Points: 78
Total Questions: 123
Total Answers: 89

Location: Liechtenstein
Member since Wed, Dec 8, 2021
3 Years ago
;