0

I have run into an odd error with my gmap module where I allow users to use the map to choose the location (rather than enter coordinates, they are allowed to enter an address too of course) but back to the map.

What's off is that the map 'works' it's just that it starts off greyed out, but if you double click the map it pops up as normal (Google Streets). Has anyone run across this error before?

Greyed Out Map

----- Edit-----

It appears that if you open up the page and the map is greyed out, if you adjust the size of the browser window even the slightest, the map will appear as normal. So where could this problem be originating from?

0

This is a classic GMap problem. It usually occurs when the map doesn't know it's dimensions initially. For example: when the dimensions are set in a stylesheet (.gmap {width: x; height: y;}).

You could try setting them inline on the wrapper div (<div class="gmap" style="width: x; height: y;">) or trigger a resize after the page has loaded, as explained here: How do I resize a Google Map with JavaScript after it has loaded?

If you are using the gmap or geolocation module, you can set the dimensions in the widget properties.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.