Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map background is white by default #22

Closed
perliedman opened this issue Sep 18, 2013 · 4 comments
Closed

Map background is white by default #22

perliedman opened this issue Sep 18, 2013 · 4 comments

Comments

@perliedman
Copy link
Contributor

When making a GetMap request without explicitly specifying the bgcolor parameter, it appears my map always get a white background, although my mapnik XML specifies a background-color attribute.

This is an example URL I use: http://myhost/?service=WMS&version=1.1.0&request=GetMap&layers=__all__&bbox=-195609.547531264,5911221.52277581,1130387.38250057,7988952.8814813&width=326&height=512&srs=EPSG:3006&format=image/png&styles=

While trying to debug this by emulating what OGCServer does, I have a bit of a hard time actually finding where the problem lies, since the configuration seems to load the background color setting properly:

from ogcserver.WMS import BaseWMSFactory
from ogcserver.common import WMSBaseServiceHandler
from ogcserver.wms111 import ServiceHandler
from ogcserver.configparser import SafeConfigParser

conf = SafeConfigParser()
conf.readfp(open('../../conf/ogcserver.conf'))

f = BaseWMSFactory()
f.loadXML("lmv-bright.xml")

wms = ServiceHandler(conf, f, "")

m = wms._buildMap({"crs":"epsg:3006", "bbox":[-195609.547531264,5911221.52277581,1130387.38250057,7988952.8814813], "width":326, "height":512, "layers":["__all__"]})

m.background
>>> Color(R=167,G=207,B=242,A=255)   # <--- expected, and not white

Is this a OGCServer issue, or is it something with my setup/request that would trigger this behaviour?

@sbrunner
Copy link

Does it #20 will this issue ?

manelclos added a commit that referenced this issue Jun 6, 2014
@manelclos
Copy link
Member

Hi Per,

The default setting for the parameters made the old code not check the map background-color in the mapfile, this is why if you use _buildMap directly the problem is not triggered.

Can you check it is fixed now?

Thanks!

@perliedman
Copy link
Contributor Author

Hi and thanks for looking into this!

I no longer work at the company where I encountered this problem, so unfortunately I no longer have access to the configuration/setup and can't verify.

@springmeyer
Copy link
Member

What are you up to now for work? dane@mapbox.com

On Jun 6, 2014, at 10:38 PM, Per Liedman notifications@github.com wrote:

Hi and thanks for looking into this!

I no longer work at the company where I encountered this problem, so unfortunately I no longer have access to the configuration/setup and can't verify.


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants