I am using OpenLayers with Google maps. I have created my map object successfully - there are no errors raised and console.log(map) shows that it is indeed an OpenLayers class - but nothing is showing on screen. All I am seeing is a white rectangle.

Does anyone know what might cause this?

Any tips for finding the bug that is causing this?

With no errors or obvious problems I don't know where to begin. It should be working!

  • Can you please post a live link to the map - so we can debug using firebug and/or other developer tools. This is not a question that can be answered without more information from you.
    – Mapperz
    Sep 9, 2011 at 16:26
  • I'm about to go home for the day but I'll try and post some code on monday. Any advice on how to go about debugging would be helpful. As I say the class appears to be set up correctly. What would you look for?
    – Mr_Chimp
    Sep 9, 2011 at 16:31

1 Answer 1


Could just be a css problem! Have you set correctly css properties of your map container? Any code would be interesting if you want help from us.

  • 1
    but this is just an assumption...
    – Mapperz
    Sep 9, 2011 at 19:29
  • Simo was right, it was a css issue. I had switched to a different css file which didn't have style a definition for div#map. Therefore the height and width properties weren't defined and without these the map doesn't display.
    – Mr_Chimp
    Sep 12, 2011 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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