Thanks Dave.

That helped resolve my problem. Infact, styles within Layer can be ordered.
I have now split different roads types into separate styles and referred to
in the desired order.

Cheers
Xin

On 02/04/2008, Dave Stubbs <[EMAIL PROTECTED]> wrote:
>
> On Tue, Apr 1, 2008 at 8:54 PM, Xin <[EMAIL PROTECTED]> wrote:
> > I am unable to order styles. I have a road layer which contains
> motorways,
> > trunk roads and residential roads. The residential roads are being
> displayed
> > on top of others.
> >
> > I have based my XML off OSM's config.
> >
> > Here is the core part of my config.
> >
> >  <Style name="minor-roads-fill">
> > motorway rule
> > trunk rule
> > residential rule
> > </Style>
> >
> >
> > <Layer name="Roads" ..>
> >     <StyleName>minor-roads-fill</StyleName>
> >  shp data source ...
> >   </Layer>
> >
> > I have tried rearranging the rules within the style without any success.
> >
> > Can anyone help at all?
> >
>
>
> The style rule order will only effect the case where the same object
> matches multiple rules -- the rules are then applied in file order. If
> you have many objects and you want them rendered in a particular order
> then you have to get the datasource to return them with the lowest
> first, or render them as separate layers.
>
> In the default OSM setup the osm2pgsql import script adds a z_order
> column, and sets residential roads to 1, motorways to 9, and other
> roads in between, and adds a 10xlayer modifier if there is a layer
> tag. The postgis datasource then has an "order by z_order" clause in
> the table parameter -- this means lowest z_orders are supplied first
> so are rendered at the bottom.
>
>
> Dave
>
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to