Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

amorsell
This post was updated on .
Hi,
When trying to patch the ZoomToSelection widget so that it can zoom to point features (something we created a work-around for in 2.4), I discovered that the ZoomToSelection and CenterSelection widgets are not working for a customers WGS84 PseudoMercator map definitions.  This is whether the flexible layout (using the Slate template for testing) has a commercial base layer present or not, whether the selected object is a point, line or polygon, or whether the underlying layer datasource is Shape, SDF or Autodesk Industry Model.

I debugged the widgets and have found that the fusion selection object is returning o.extents.minx, o.extents.miny, o.extents.maxx and o.extents.maxy as null in the map.js Fusion.SelectionObject class.  So the getLowerLeftCoord and getLowerRightCoord methods are returning null.

Can others confirm this problem?  Any ideas what the deeper problem might be?

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

amorsell
I forgot to mention that these widgets with these same layouts work just fine with Fusion 2.4 (AIMS 2013).
Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

Jackie Ng
In reply to this post by amorsell
I think I found the problem:

http://trac.osgeo.org/mapguide/ticket/2458

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

amorsell
Thanks Jackie.  Do you think that would result in a null bounding box like I'm seeing or would you expect it to return a bounding box in the native coordinate system?
Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

Jackie Ng
Sorry, I misread the problem. I was getting the bboxes in the layer's CS and not null bboxes. The ticket will address that particular issue.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

Jackie Ng
The issue being bboxes in the layer's CS if I haven't made myself clear.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

amorsell
In reply to this post by Jackie Ng
I don't know if the bbox is coming back null, what I've determined is that the fusion selection object is returning o.extents.minx, o.extents.miny, o.extents.maxx and o.extents.maxy as null in the map.js Fusion.SelectionObject class.  Perhaps the issues are related.
Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

Flipper
In reply to this post by Jackie Ng

Point being infinite to zoom to in a non real world unit?

On Jun 16, 2014 9:03 PM, "Jackie Ng" <[hidden email]> wrote:
Sorry, I misread the problem. I was getting the bboxes in the layer's CS and
not null bboxes. The ticket will address that particular issue.

- Jackie



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Fusion-2-6-AIMS-2015-ZoomToSelection-Problem-tp5145845p5146190.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

Jackie Ng
In reply to this post by amorsell
That would suggest the QUERYMAPFEATURES response returned no SelectedLayer elements in the response.

Is o.hasSelection == false as well?

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

amorsell
The map does have a selection object and the selection object has all of the correct properties except for fMaxX, fMaxY, fMinX and fMiny.  Please see the attached screenshots.  These are the generic slate layout containing the same map definition except one is WGS PseudoMercator and one is a US State Plane coordinate system.



Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

Jackie Ng
Just as a test, do you get the same problem if you disable the bUseNativeServices flag in the checkNativeServiceSupport() function in MapGuide.js?

That disables use of v2.6.0 QUERYMAPFEATURES and falls back to the existing PHP scripts

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

amorsell
I tried that and it did not have any effect.  Here's a way to easily see this problem in Fusion 2.6:

With the Sheboygan dataset, create a new layer from the Trees SDF data connection.  Copy the Sheboygan map to a new map, assign WGS84 PseudoMercator, add the Trees layer to it, and also make the Roads layer selectable.  Create a new Fusion layout based on the Slate template and add the map to it.  Open the layout in a browser.  Select a tree point and press Zoom Selection.  Based on what I'm seeing, nothing should happen.  Select a road line and press Zoom Selection.  A zoom to 1:1 in the wrong area should happen.  

Doing this same thing with the same Sheboygan dataset in Fusion 2.4 will result in the point centering but not zooming (which is expected behavior) and the line will center and zoom correctly.

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

Jackie Ng
Ok, does this appear to only be affecting point layers? Because it's starting to sound like a ticket I filed 7 weeks ago: http://trac.osgeo.org/mapguide/ticket/2441

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

amorsell
I don't think they're the same issue.  When I select a feature on a tree layer, the ID and other property values are properly retrieved.

In my prior message I also mentioned testing it with the Roads (lines) layer.  They both have problems that are manifested differently.  Looking more closely at the result with lines, I notice that in 2.6 the selection extents are retrieved in the layers native coordinate system, LL84, whereas with 2.4 the selection extents are retrieved in the map coordinate system, WGS84.PseudoMercator.  So in 2.6, Zoom Selection with lines is zooming to a LL bounds in a WGS84.PseudoMercator map.  

But for points, the extents coordinates are being returned as nulls.  

Can you replicate this issue with the Sheboygan dataset?

Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

Jackie Ng
I think the problem is that the QueryFeatureProperties() API which v2.6 QUERYMAPFEATURES currently uses to assemble the response does not seem to produce the same expected set of data as QueryFeatures() even though we pass the same set of parameters to both.

I've been testing on the Sheboygan map where Parcels and Trees are selectable, and I've been getting cases where selecting a parcel gives me a selected parcel image, but no attributes because QUERYMAPFEATURES was fetching the attributes of a selected tree and vice versa.

Rather than try to bash an existing QueryFeatureProperties API into shape with a metaphorical hammer to make it do something I'm starting to think it wasn't originally designed for, I've tried to write the feature attributes into XML response directly from the MgSelection of the MgFeatureInformation we get. This is proving to be a more reliable approach, and I don't get the symptoms that I have been getting before.

The patch is here (http://trac.osgeo.org/mapguide/ticket/2459). I've submitted to -internals for review. It will land in trunk/2.6 by the end of the week if the patch is okay and/or nobody has made any comments by then.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

amorsell
Thanks Jackie.  I don't have a build environment so I will look for the changes in Trunk.
Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

amorsell
In reply to this post by Jackie Ng
Is there a build available with the updated dll's or would I need to check-out the 2.6 trunk and re-build myself?

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

Jackie Ng
You will have to check out 2.6 or trunk and build everything up to the MapGuideCommon library (that contains the fix)

- Jackie
Reply | Threaded
Open this post in threaded view
|

RE: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

amorsell

Would it be possible to get just the needed dll(s) so I can test the fix?

 

Thank you,

 

Andy

 

From: Jackie Ng [via OSGeo.org] [mailto:ml-node+[hidden email]]
Sent: Friday, June 20, 2014 5:39 PM
To: Andy Morsell
Subject: Re: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

 

You will have to check out 2.6 or trunk and build everything up to the MapGuideCommon library (that contains the fix)

- Jackie


If you reply to this email, your message will be added to the discussion below:

http://osgeo-org.1560.x6.nabble.com/Fusion-2-6-AIMS-2015-ZoomToSelection-Problem-tp5145845p5147102.html

To unsubscribe from Fusion 2.6 (AIMS 2015) ZoomToSelection Problem, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

RE: Fusion 2.6 (AIMS 2015) ZoomToSelection Problem

GordonL
That would be great.  I think this issue with 2.6 really affects selecting points too (not window, but click since the boundary is too small), especially if the map is in Spherical Mercator.
12