[OpenLayers-Users] Format.XML write and IE

Christopher Schmidt crschmidt at metacarta.com
Thu Jan 24 07:46:44 EST 2008


On Thu, Jan 24, 2008 at 10:27:30AM +0100, Bart van den Eijnden (OSGIS) wrote:
> It was my own stupid mistake, I was using:
> 
> var boundingFeature = OpenLayers.Format.XML.prototype.write(stChild); 
> 
> where I should have used:
> 
> var xml = new OpenLayers.Format.XML(); 
> var boundingFeature = xml.write(stChild); 

Was this as the result of documentation somewhere? Copy paste? It's not
the first time I've seen it happen, and I'd like to know why people do
it, if we can.

As a rule, if you're not working on the code in lib/, you shoudl never
have a '.prototype.' in your code.  (I think.)

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list