Ticket #2485 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

wrong fillColor with externalGraphic and Collection geometry

Reported by: fredj Owned by: ahocevar
Priority: major Milestone: 2.9 Release
Component: Renderer.VML Version: SVN
Keywords: Cc:
State: Complete

Description

If the VML renderer draws a collection of point and polygon with an externalGraphic set, the polygon fillColor is set to none.

Because:

  • OpenLayers.Renderer.Elements.drawGeometry() calls setStyle for the point and pass the style object.
  • OpenLayers.Renderer.VML.setStyle() update the style object (line 242 and 243)
  • OpenLayers.Renderer.Elements.drawGeometry() calls setStyle for the polygon and pass the same style object.

The polygon fillColor is none.

Attachments

openlayers-2485.patch Download (1.3 KB) - added by ahocevar 3 years ago.
openlayers-2485.1.patch Download (1.9 KB) - added by fredj 3 years ago.
local copy of style.fillColor and options.isStroked

Change History

Changed 3 years ago by ahocevar

Changed 3 years ago by ahocevar

  • state set to Review

Thanks fredj for the verbose description of what happens - with that in my hands it was easy to fix the issue (see attached patch).

Tests still pass, loading  http://finder.geocommons.com/overlays/download/4433.kml into the vector-formats example returns the same result as in browsers with SVG rendering. Please review.

Changed 3 years ago by fredj

local copy of style.fillColor and options.isStroked

Changed 3 years ago by fredj

  • state changed from Review to Commit

forget attachment:openlayers-2485.1.patch Download: options argument is build in drawGeometryNode and not reused for collection geometry.

Please commit attachment:openlayers-2485.patch Download

Changed 3 years ago by ahocevar

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed

(In [10063]) fixed VML renderer so it does not change fillColor on node._style anymore when rendering externalGraphic. r=fredj (closes #2485)

Note: See TracTickets for help on using tickets.