[OpenLayers-Dev] [Polygon Rendering] Inverse fill

RICHARD Didier didier.richard at ign.fr
Sat May 19 07:08:24 EDT 2012


Hi devs,

Based on the kml-layer.html with the following code :

var map = new OpenLayers.Map({
    div: "map",
    layers: [
        new OpenLayers.Layer.WMS(
            "WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0",
            {layers: "basic"}
        ),
        new OpenLayers.Layer.Vector("KML", {
            strategies: [new OpenLayers.Strategy.Fixed()],
            protocol: new OpenLayers.Protocol.HTTP({
                url: "polygon.kml",/****** the polygon ******/
                format: new OpenLayers.Format.KML({
                    extractStyles: true,
                    extractAttributes: true,
                    maxDepth: 2
                })
            })
        })
    ],
    numZoomLevels:19,/****** 19 levels to see the bug ******/
    center: new OpenLayers.LonLat(4.3560894576721,
45.084481104508),/****** new center ******/
    zoom: 17
});


At this zoom, the symbology is correct : polygon's inside is filled and
the outside is left blank.
When you zoom to level 18, the polygon's inside is not filled anymore and
the outside is filled.

Tested with OpenLayers 2.11, OpenLayers 2.12-rc4.

The polygon is attached.

I have browse the tickets on trac, but found nothing relevant. Previously,
there was a hole in the polygon, but it has been removed.

Any idea ?

Thanks,
-- 
RICHARD Didier - Chef du pôle technique du Géoportail
2/4, avenue Pasteur - 94165 Saint Mandé Cedex
Tél : +33 (0) 1 43 98 83 23
-------------- next part --------------
A non-text attachment was scrubbed...
Name: polygon.kml
Type: application/vnd.google-earth.kml+xml
Size: 4483 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20120519/87af0021/polygon.bin


More information about the Dev mailing list