[OpenLayers-Dev] Empty geometries causing errors in IE
Roald de Wit
rdewit at users.sourceforge.net
Mon Oct 29 20:00:34 EDT 2007
On Fri, 2007-10-26 at 09:52 -0600, Tim Schaub wrote:
> I'm entirely in favor of this. I don't think the renderer is the right
> place to bomb (or hey maybe even throw an exception!) on an empty geometry.
> I think it makes sense to have our format classes throw exceptions on
> empty geometries. They could even have an option to allow empty
> geometry. In any case, it should be up to the application designer to
> decide what to do with empty geometry. As library developers, I don't
> think we should impose our beliefs about empty geometries on all others.
> Breaking in only one browser, and only when rendering, is a bit late and
> a bit inconsistent.
> > See ticket #1111 for a simple 'fix'.
> See also http://trac.openlayers.org/ticket/968
> I'd like to see some tests for the renderers really. I haven't looked
> closely at your patch, but it would be nice to make sure we don't slip
> once we decide to make a change (like make browser behavior consistent).
That fix in the patch I mentioned is probably not the best solution
(although it worked for us).
A few places where I can imagine we could prevent the renderer from
trying to render the empty geometry is:
- Renderer/Elements.js: drawGeometryNode()
- Renderer.js: drawFeature()
- Format/*.js: parseGeometry()
It would be nice if we can come up with a clean solution for this.
Roald de Wit
roald.dewit at lisasoft.com
Commercial Support for Open Source GIS Software
More information about the Dev