[OpenLayers-Dev] Re: How to override abstract OpenLayers.Protocol.WFS.v1?

myOpenLayersUName joanne.mcgraw at SYMPATICO.CA
Wed Aug 10 17:28:49 EDT 2011

In case anyone is trying to use this thread in future...

If you are trying to build a 2.8 or 2.10 OpenLayers.js with a 2.11
BaseTypes/Class.js, you will also need to make a change to the
Format/WMSCapabilities.js to ensure the OpenLayers.Format.XML definition is
inserted into the file (and therefore loaded) before it is. You can just
update the Format/WMSCapabilities.js build directive (at the top of the
file) as follows:

 * @requires OpenLayers/Format.js
 * @requires OpenLayers/Format/XML.js

Otherwise, when you load the new OpenLayers.js script (without updating the
build directive), an error occurs during this OpenLayers.Class call:

The error occurs because it is called before OpenLayers.Format.XML class has
been defined. Adding "@requires OpenLayers/Format/XML.js" at the top of the
Format/WMSCapabilities.js ensures that scripts contents are added before the

I have no idea why the old Class constructor wouldn't care about the order
of definitions, but the new one does. All I know is that this finally works
AND I can extend the OpenLayers.Protocol.WFS.v1.js to display a message as
part of the handleRead functionality.


View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-override-abstract-OpenLayers-Protocol-WFS-v1-tp6534072p6674221.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.

More information about the Dev mailing list