[Mapguide-trac] [mapguide-trac] #2439: Fusion exception when selecting point feature
MapGuide Open Source
trac_mapguide at osgeo.org
Wed Apr 30 05:52:39 PDT 2014
#2439: Fusion exception when selecting point feature
------------------------+---------------------------------------------------
Reporter: loureiro | Owner:
Type: defect | Status: new
Priority: high | Milestone: 2.6
Component: Server | Version: 2.5.0
Severity: critical | Keywords:
External_id: |
------------------------+---------------------------------------------------
This issue is reproducible on Mapguide 2.6 preview 2: when selecting a
point feature with a mouse click, a javascript exception is thrown by
Fusion when clicking a little off the center of the symbol.
Steps to reproduce:
1. Load the Sheboygan.mpg from
http://mapguide.osgeo.org/download/releases/2.0.x-samples.
2. Create a "Trees" layer for the corresponding SDF data source in the mpg
and add it to the map (shift it to the top of the drawing order). Edit the
symbol style and increase the square width/length to 0.15 (this will make
it easier to reproduce the issue).
3. Open the "Slate" flexible layout in a browser (e.g., Chrome).
4. Zoom in until you see the streets. Click right on the center of a tree
(square symbol) to confirm that it can be selected. Click off center on
another tree (but still inside the square) to cause a javascript
exception.
Error Details:
Exception occurred in AJAX callback.
Message: Cannot read property 'length' of undefined
Location: undefined (undefined)
Response:
{"FeatureInformation":{"FeatureSet":[{"@xmlns:xsi":["http://www.w3.org/2001
/XMLSchema-
instance"],"@xsi:noNamespaceSchemaLocation":["FeatureSet-1.0.0.xsd"],"Layer":[{"@id
":["d96d795e-d05d-
11e3-8000-f04da2e6c9bb"],"Class":[{"@id":["SHP_Schema:Trees"],"ID":["3ZYAAA=="]}]}]}],"Hyperlink":null,"InlineSelectionImage":null,"SelectedFeatures":[{"SelectedLayer":[{"@id
":["d96d795e-d05d-
11e3-8000-f04da2e6c9bb"],"@name":["Trees"],"LayerMetadata":[{"Property":[{"DisplayName":["ID"],"Name":["ID"],"Type":["9"]}]}]}]}],"Tooltip":null}}
Stack Trace:
- ? at http://localhost:8008/mapguide/fusion/lib/fusionSF.js (line: 1990)
- Object.window.Fusion.ajaxException at
http://localhost:8008/mapguide/fusion/lib/fusionSF.js (line: 788)
- ? at http://localhost:8008/mapguide/fusion/lib/fusionSF.js (line: 46592)
- Object.OpenLayers.Ajax.Request.OpenLayers.Class.dispatchException at
http://localhost:8008/mapguide/fusion/lib/fusionSF.js (line: 96974)
- Object.OpenLayers.Ajax.Request.OpenLayers.Class.respondToReadyState at
http://localhost:8008/mapguide/fusion/lib/fusionSF.js (line: 96923)
- Object.OpenLayers.Ajax.Request.OpenLayers.Class.onStateChange at
http://localhost:8008/mapguide/fusion/lib/fusionSF.js (line: 96821)
- XMLHttpRequest. at http://localhost:8008/mapguide/fusion/lib/fusionSF.js
(line: 46592)
The problem happens because the QUERYMAPFEATURES request to the mapguide
server is returning an incomplete JSON response (no "Feature" field),
causing the following Fusion code to fail:
selLayer.Feature.length
--
Ticket URL: <https://trac.osgeo.org/mapguide/ticket/2439>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list