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'm using openlayers to display a google base-map layer and it works fine on Firefox/IE/Safari. I'm having problems with Chrome as the tiles have a small white space between them shown in this image.

enter image description here

I found this discussion about invasive CSS which suggested the problem was due to

Your theme is "helpfully" adding margins to img tags. you can override this with

.openlayers-map img{ margin:0px }

I'm unclear where I put this line. I read through the openlayers CSS file but I don't have a good idea what is going on, on where I should be editing the img tag.

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

There are two possibilities. The more likely is that you have Chrome zooming the page in or out, which introduces the white lines. Do cmd-0 (or ctrl-0) and see if that fixes it.

Otherwise, add that line to your CSS file, which might be site.css or whatever. Add it to the bottom, though it doesn't matter much. A live example would make this question easier to fix / diagnose.

share|improve this answer
    
Nicely spotted - it was due to zooming. Thank you. –  djq Mar 26 '12 at 19:39
add comment

That's something that has to do with Open Layers 2.12 and above, regarding the way that deals with the image tiles. I tried different things related to CSS and nothing changed. In my case, we decided to keep with Open Layers 2.11. and the white space were gone.

share|improve this answer
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.