[OpenLayers-Users] Canvas renderer causing fill in style, map, to be ignored

Rob Hyx robhyx at gmail.com
Thu Aug 9 08:12:20 PDT 2012


So just to add a bit more information to the issue I'm still having.
It appears to only be with polygons that have holes 'cut out' in them.
Solid polygons fill in fine with the canvas renderer. I found this
bug: http://trac.osgeo.org/openlayers/ticket/3130 which doesn't
mention anything being broken, but rather an inefficiency in the way
such polygons are rendered. Has anyone else encountered this: polygons
with a fill color, that have holes in them, are not filling in with a
canvas renderer?

Thanks in advance.

On Mon, Aug 6, 2012 at 7:01 PM, Robert Hicks <robhyx at gmail.com> wrote:
> Yeah, I understand that. What I need to be able to do is be able to change
> the renderer like with a setter. I tried vectorLayer.renderer = new
> OpenLayers.Renderer.Canvas(vectorLayer.renderer.container.id); but I get an
> error (this.container is null).
>
> I stepped through the Canvas.js file and it appears that the fill color is
> there for each feature but for some reason style.fill is false for every
> feature after the first one. So I get one polygon filled in but the rest are
> empty. I don't know why this would happen, as I'm not even setting that
> boolean in my style map.
>
>
> On Aug 6, 2012, at 3:27 PM, Mike Ryan wrote:
>
> Hi Rob,
>
> When you specify that array of renderers, I believe you are specifying your
> *preference* of renderer. You put your first choice first, etc. If that
> choice is not available, then it tries the next one, etc.
>
> Does that help?
>
> -Mike
>
> On 8/1/2012 3:00 PM, openlayers-users-request at lists.osgeo.org wrote:
>
> Message: 2
> Date: Wed, 1 Aug 2012 09:30:42 -0400
> From: Rob Hyx <robhyx at gmail.com>
> To: openlayers-users at lists.osgeo.org
> Subject: Re: [OpenLayers-Users] Canvas renderer causing fill in style,
> 	map,	to be ignored
> Message-ID:
> 	<CAF-PjvzhYiE-MwmxX+OaVzwPB+E4gqs4WHYPBHpyXZ-QS+QN4Q at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Okay, let me take back what I said last. Adding the additional
> renderers ['SVG,'VML,'Canvas'], does fix my problem, but now when I go
> to use the Canvas renderer it's not vectorLayer.renderer. Instead I
> get the SVG renderer. I see an array vectorLayer.renderers but that's
> just an array of Strings. I'm looking at the API and it is not obvious
> to me how you can pick your renderer of choice. It seems you must be
> able to do it otherwise why would you be able to specify more than
> one.
>
> Any ideas?
>
>
>



-- 
HYX
http://hyx-music.com


More information about the Users mailing list