[OpenLayers-Dev] Adding empty features
Jeff Dege
jdege at korterra.com
Fri Mar 23 14:00:25 EDT 2007
I'm not at all sure I'd call this a bug.
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
More information about the Dev
mailing list