Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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!

share|improve this question
    
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 '11 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 '11 at 16:31
add comment

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
    
but this is just an assumption... –  Mapperz Sep 9 '11 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 '11 at 11:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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