[OpenLayers-Dev] Why check the fileType of ajax request for xml?
Christopher Schmidt
crschmidt at metacarta.com
Wed Mar 12 09:03:23 EDT 2008
On Wed, Mar 12, 2008 at 01:11:08PM +0800, XinGang Li wrote:
> In the layers that load data from xml stream, we always check the fileType
> like this:
>
> requestSuccess:function(request) {
> if (this.features) {
> var doc = request.responseXML;
>
> if (!doc || request.fileType!="XML") {
> doc = OpenLayers.parseXMLString(request.responseText);
> }
> ......
XinGang,
Thanks for your feedback. Tim has confirmed that this is a mistake
leftover from the "Early Days" of OpenLayers, and a patch to remove this
is currently awaiting commit.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Dev
mailing list