Opened 11 years ago
Closed 11 years ago
#2439 closed defect (fixed)
Fusion exception when selecting point feature
Reported by: | loureiro | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 2.6 |
Component: | Server | Version: | 2.5.0 |
Severity: | critical | Keywords: | |
Cc: | External ID: |
Description
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:
- Load the Sheboygan.mpg from http://mapguide.osgeo.org/download/releases/2.0.x-samples.
- 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).
- Open the "Slate" flexible layout in a browser (e.g., Chrome).
- 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
Attachments (1)
Change History (4)
comment:1 by , 11 years ago
by , 11 years ago
Attachment: | SheboyganT.mgp added |
---|
Sheboygan minus Parcels and Buildings plus Trees
comment:2 by , 11 years ago
I had to remove Parcels and Buildings layers from the mgp in order to fit the maximum attachment size.
comment:3 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in http://trac.osgeo.org/fusion/changeset/2832
Beta 1 will have this fix. However, this fix is nothing more than a way to gracefully handle an underlying issue in the new QUERYMAPFEATURES (#2441). We'll try to fix that particular after Beta 1.
Can you attach an mgp of your modified resources?