OpenLayers OpenLayers

Ticket #1431 (new bug)

Opened 5 months ago

Last modified 4 months ago

Features that fail the SVG renderer's inValidRange check will not be redrawn when recentering the map

Reported by: ahocevar Assigned to:
Priority: minor Milestone: 2.7 Release
Component: Renderer.SVG Version: 2.5
Keywords: Cc: seb@openplans.org
State: Needs Discussion

Description

When a vector layer contains features which fail the SVG renderer's inValidRange check, they will not be shown on the map until drawFeature is called again for those features. This happens when the zoom changes, but not when the map is just recentered. This behaviour can be tested with sbenthall's example for #1360.

Change History

03/12/08 11:20:00 changed by ahocevar

  • owner changed.
  • component changed from general to Renderer.SVG.

03/12/08 11:24:59 changed by sbenthall

  • cc set to seb@openplans.org.

03/12/08 18:57:07 changed by ahocevar

  • state changed from Needs More Work to Needs Discussion.

This one is tricky. The example mentioned above recenters the map over a very large distance. But still, moveTo() in Layer.Vector will not cause the layer to be redrawn.

A simple (but not very beautiful) fix would be to set a flag in the renderer when features are outside the valid range. Layer.Vector.moveTo() would then have to check for that flag, redraw the layer if set, and reset the flag when done.

What do others think?

03/17/08 22:42:54 changed by crschmidt

If we're going to redraw the layer when we're done moving anyway, then we might as well just reset the 0,0 point so that we can draw most everything. The reason this wasn't done thus far is because the renderer doesn't have access to the layer, nor does it have a list of geometries, and we didn't want to make the end of dragging an expensive task at the time.

Maybe that decision was premature. I don't think that fixing this particular bug is necessary for 2.6, since it's not a regression, just a problem that we've always had.

03/19/08 15:17:01 changed by sderle

agreed that this is overly complex for 2.6; I move to boot to 2.7

03/19/08 16:20:40 changed by crschmidt

  • milestone changed from 2.6 Release to 2.7 Release.

Not a regression, no existing patch, moving to 2.7.