Uncaught SyntaxError when hover over LayerSwitcher button

المشرف العام

Administrator
طاقم الإدارة
I have a hover control using WMSGetFeatureInfo to return information about the features under the cursor which works in all situations except one.

I also have a LayerSwitcher control created with self.map.addControl(new OpenLayers.Control.LayerSwitcher());. When I hover over the +/- symbol used to open or close the layer switcher I get a javascript error. By adding breakpoints I know that the hover control's beforegetfeatureinfo event fires, but then not the getfeatureinfo or nogetfeatureinfo events.

The stack trace suggests that the problem is within OpenLayers when trying to handle the response from the WMSGetFeatureInfo request. Is this a known problem with a workaround, as I can't find anything about it online?

According to Chrome Developer Console the error is

Uncaught SyntaxError: Unexpected token < (index):1

I think an HTML page is being returned by WMSGetFeatureInfo and this is why the first character is
 
أعلى