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:

  1. Load the Sheboygan.mpg from http://mapguide.osgeo.org/download/releases/2.0.x-samples.
  1. 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).
  1. Open the "Slate" flexible layout in a browser (e.g., Chrome).
  1. 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:

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)

SheboyganT.mgp (2.9 MB ) - added by loureiro 11 years ago.
Sheboygan minus Parcels and Buildings plus Trees

Change History (4)

comment:1 by jng, 11 years ago

Can you attach an mgp of your modified resources?

by loureiro, 11 years ago

Attachment: SheboyganT.mgp added

Sheboygan minus Parcels and Buildings plus Trees

comment:2 by loureiro, 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 jng, 11 years ago

Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.