Ticket #2693 (closed feature: fixed)

Opened 3 years ago

Last modified 3 years ago

give featureId to eraseGeometry

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

Description

It would be helpful for some custom renderers (like my own in this particular case) if eraseGeometry was called with the featureId parameter. My DOMElements are created with id = featureId, and this makes is more efficient to look up the element when erasing the geometry.

Attachments

ticket2693.patch Download (3.0 KB) - added by bartvde 3 years ago.
ticket2693.2.patch Download (3.3 KB) - added by bartvde 3 years ago.
updated patch fredj's improvement

Change History

Changed 3 years ago by bartvde

If I look at the Canvas renderer, it has the same issue as I have in my Renderer, and therefore it needs to keep an object called geometryMap. To me this seems like overkill, but maybe there was a good reason for this approach?

Changed 3 years ago by bartvde

Changed 3 years ago by bartvde

  • state set to Review

Tests still pass in FF3.6 and Safari 4.

However 1 test is failing on Safari for Renderer.SVG, but this is unrelated to this change:

test_svg_importsymbol fail 1 ok 1
fail Square symbol rendered correctly. eq: values differ: got 0001111000, but expected 0,00,11,11,00,0

Please review.

Changed 3 years ago by fredj

Safari Renderer.SVG tests: #2710

Changed 3 years ago by fredj

in OpenLayers.Renderer.Elements.eraseGeometry(), the function is recursively called (line 865): the featureId should be added the the function call.

Changed 3 years ago by bartvde

updated patch fredj's improvement

Changed 3 years ago by fredj

  • state changed from Review to Commit

tests pass in Chrome, please commit

Changed 3 years ago by bartvde

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

(In [10435]) Renderer: give featureId to eraseGeometry function, r=fredj (closes #2693)

Note: See TracTickets for help on using tickets.