Hey Dane, 
Thanks! I'm using the BC Albers projection, which makes BC look more normal 
than the Mercator, which makes the top of BC look HUGE! 

Yes I am using the 129 patch ( 
http://trac.mapnik.org/attachment/ticket/129/wms_theofilu.diff ) 

#!/usr/bin/env python 
from mapnik.ogcserver.WMS import BaseWMSFactory 
from mapnik import * 
mapfile = 'map.xml' 
class WMSFactory(BaseWMSFactory): 
def __init__(self): 
BaseWMSFactory.__init__(self) 
self.loadXML('/home/sysadmin/map/map.xml') 
self.finalize() 

Which I cribbed from your example 
http://mapnik-utils.googlecode.com/svn/trunk/tutorials/wms/ 

(Which just changed I noticed, the xml loading has moved to a new file...) 

I tried your suggestion of putting the styles into difference instances, and 
that seems to cause problems. I can still load the "edi" shape layer but if I 
add in the second label layer (in my OpenLayers WMS request) it causes a error 
and I get image tiles with the error message written on them! 

Once again this same XML works from the CLI. 

Thanks for looking into this Dane! 

Jay 

----- Original Message ----- 
From: "Dane Springmeyer" <[EMAIL PROTECTED]> 
To: "Jay Douillard" <[EMAIL PROTECTED]> 
Cc: "mapnik" <[email protected]> 
Sent: Friday, October 31, 2008 9:02:59 AM GMT -08:00 US/Canada Pacific 
Subject: Re: [Mapnik-users] Difference output of labels from wms and command 
line 

Hi Jay, 


Nice map of BC! 







On Oct 30, 2008, at 4:04 PM, Jay Douillard wrote: 


So my command line output seems to be behaving correctly, but the wms isn't 
responding right. 
See the two example png files, wms and python(command line) both using the same 
xml style file. 




As far as WMS, I assume you are using this patch 
http://trac.mapnik.org/ticket/129 to get the WMS server reading XML? If so, 
there is likely improvement needed in the patch to register aggregate styles in 
the correct order. 


Or have you come up with a different solution? 



In the wms version the labels are under the polygons, even though the style is 
called later in my xml. 
The command line version is just fine....any ideas where I could be going 
wrong? 




In general a work around could be to do this (register your styles to a 
different instance of the same layer): 


<Layer name="edi" srs="+proj=aea +lat_1=50 +lat_2=58.5 +lat_0=45 +lon_0=-126 
+x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs "> 
<StyleName>edi</StyleName> 
<Datasource> 
<Parameter name="type">shape</Parameter> 
<Parameter name="file">/home/sysadmin/map/bc_edi</Parameter> 
</Datasource> 
</Layer> 



<Layer name="edit_labels" srs="+proj=aea +lat_1=50 +lat_2=58.5 +lat_0=45 
+lon_0=-126 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs "> 
<StyleName>labels</StyleName> 
<Datasource> 
<Parameter name="type">shape</Parameter> 
<Parameter name="file">/home/sysadmin/map/bc_edi</Parameter> 
</Datasource> 
</Layer> 





The other difference is that when I change the BG color in the xml it doesn't 
effect the WMS but it changes in the command line (notice the blue 
background)... 



I'll wait to comment on this until I understand more how you are loading your 
XML into the WMS. Can you paste a code snippet? 


Cheers, 


Dane 



_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to