Ticket #2712 (closed feature: fixed)

Opened 3 years ago

Last modified 3 years ago

Renderer and Format.SLD should use fill and stroke unless set to false

Reported by: ahocevar Owned by:
Priority: minor Milestone: 2.10 Release
Component: Renderer Version: 2.9
Keywords: Cc:
State: Complete

Description

OpenLayers.Renderer and OpenLayers.Format.SLD currently check for symbolizer.stroke being true, but the API docs for OpenLayers.Feature.Vector.style say:

 * fill - {Boolean} Set to false if no fill is desired.

and

 * stroke - {Boolean} Set to false if no stroke is desired.

The attached patch fixes this behavior. All examples still look right and tests still pass.

Attachments

openlayers-2712.patch Download (3.9 KB) - added by ahocevar 3 years ago.
openlayers-2712-reopened.patch Download (0.5 KB) - added by ahocevar 3 years ago.
change the SLDSelect control's default Polygon symbolizer to produce the same result as before

Change History

Changed 3 years ago by ahocevar

What I said in the ticket description is not 100% true. Only Renderer does a fill and stroke check. Format.SLD does some ducktyping. With the above patch, we get a consistent behavior.

Thanks for any review!

Changed 3 years ago by ahocevar

Changed 3 years ago by tschaub

  • state changed from Review to Commit

This looks good. Assuming tests pass in IE, please commit.

Changed 3 years ago by ahocevar

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

r10430 - r=tschaub

Changed 3 years ago by elemoine

  • status changed from closed to reopened
  • resolution fixed deleted

[10430] breaks the SLDSelect.html tests and one of our apps. Reopening, and researching the issue...

Changed 3 years ago by ahocevar

change the SLDSelect control's default Polygon symbolizer to produce the same result as before

Changed 3 years ago by ahocevar

  • state changed from Complete to Review

The above patch makes the SLDSelect tests pass again. Of course, due do the original issue, the SLD produced by SLDSelect had no stroke, which we can now - according to the docs - achieve by setting stroke to false.

BTW, the inconstency of the behavior that the original patch fixed can be seen by looking at the default Point symbolizer in the SLDSelect control. It also does not define any stroke properties, but the resulting SLD has a stroke.

All tests pass now. Thanks for any review.

Changed 3 years ago by elemoine

  • state changed from Review to Commit

Thanks Andreas.

Changed 3 years ago by ahocevar

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

(In [10446]) change the SLDSelect control's default Polygon symbolizer to produce the same result as before r10430. r=elemoine (closes #2712)

Note: See TracTickets for help on using tickets.