[OpenLayers-Dev] [Polygon Rendering] Inverse fill

Eric Lemoine eric.lemoine at camptocamp.com
Sat May 19 09:34:01 EDT 2012


On Sat, May 19, 2012 at 1:08 PM, RICHARD Didier <didier.richard at ign.fr> wrote:
> 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.

Nasty. Do you know an OpenLayers version with which your example
works? Your example works correctly with the Canvas renderer
(renderers: ['Canvas'] in the layer config), so this is probably a bug
in the SVG renderer.



-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com


More information about the Dev mailing list