[OpenLayers-Dev] Adding empty features

Christopher Schmidt crschmidt at metacarta.com
Sat Mar 24 07:42:48 EDT 2007


On Fri, Mar 23, 2007 at 01:00:25PM -0500, Jeff Dege wrote:
> I'm not at all sure I'd call this a bug.

This is a case where a debugging framework would come in handy. I agree
it's not a bug, but it should be addressed when we have a useful way of 
reporting unexpected behavior to users so that they can debug it.

-- Chris

> Build a polygon feature from an empty pointlist:
> 
>    var pointList = [];
>    var linearRing = new OpenLayers.Geometry.LinearRing(pointList);
>    var polygonFeature = new OpenLayers.Feature.Vector(
>       new OpenLayers.Geometry.Polygon([linearRing]), null,
> displayStyle);
>    displayAreasLayer.addFeatures([polygonFeature]);
>  
> 
> Error on line 192 of Renderer/VML.js:
> 
>         var scaledBox = 
>             new OpenLayers.Bounds((bbox.left/resolution).toFixed(),
>                                   (bbox.bottom/resolution).toFixed(),
>                                   (bbox.right/resolution).toFixed(),
>                                   (bbox.top/resolution).toFixed());
> 
> Microsoft JScript runtime error: 'left' is null or not an object
> 
> 
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
> 

-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list