[OpenLayers-Trac] Re: [OpenLayers] #2876: VML rendering issue with polygons with zero area interior rings

OpenLayers trac-20090302 at openlayers.org
Thu Oct 14 20:27:02 EDT 2010


#2876: VML rendering issue with polygons with zero area interior rings
--------------------------+-------------------------------------------------
 Reporter:  tschaub       |       Owner:  tschaub     
     Type:  feature       |      Status:  assigned    
 Priority:  minor         |   Milestone:  2.11 Release
Component:  Renderer.VML  |     Version:  SVN         
 Keywords:                |       State:  Review      
--------------------------+-------------------------------------------------

Comment(by tschaub):

 Brilliant find.  This indeed fixes the problem (it would be great to
 demonstrate the issue to the IE team somehow).

 Since we are taking a performance hit here, I think it's worth measuring
 cost/benefit.  With this patch, when we render polygons that have interior
 rings with many points, we are doing an unnecessary area calculation (an
 extra loop through all ring points with a bit of calculation for each).

 The majority of the cases where this IE VML bug is going to affect us is
 during interior ring digitizing.  As a compromise, we could say that we
 close the path if there are three spatially distinct points in an interior
 ring.  This doesn't treat zero-area rings with three or more distinct
 points, but we could say that we're not going to encounter those much (you
 can create one temporarily with the DrawFeature control by digitizing an L
 shaped interior ring and then hovering over the middle point - but you
 can't add this ring to the polygon because it has zero area).

 We can do this second method without much cost, because we are already
 looping through all the ring points to assemble the VML path string.  I'll
 attach a patch that does this for consideration.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/2876#comment:4>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list