[mapguide-users] Autodesk Help - OnSelectionChanged

Kori Maleski km at pat.ca
Fri May 12 15:11:54 EDT 2006


Walt thank you very much for your help.
 
I did an uninstall of the DWF Composer and all worked fine (I have a few javasript errors to address still).
 
 
 
Note to all:
 
The OnSelectionChanged event will fail when DWF Composer is installed along side DWF Viewer when the Composer is installed AFTER the Viewer.
 
 
My OnSelectionChanged functions now work between DWF and the AJAX smoothly.
 
 
 
 
 
Cheers,
 
 
 
 
Kori Maleski  BSc. 
Senior Technical Consultant
 
Pacific Alliance Technologies
Suite 400 - 534 17 Ave. SW Calgary, AB CANADA T2S 0B1
TEL 403.770.1917 FAX 877.691.9149 TOL 877.691.9171 www.pat.ca <http://www.pat.ca/> 

________________________________

From: Walt Welton-Lair [mailto:walt.welton-lair at autodesk.com]
Sent: Fri 12/05/2006 9:27 AM
To: users at mapguide.osgeo.org
Subject: [BULK] RE: [mapguide-users] Autodesk Help - OnSelectionChanged


I now see Jason's other post for this thread - http://www.nabble.com/OnSelection-Event--t1561860.html#a4242868 <http://www.nabble.com/OnSelection-Event--t1561860.html#a4242868> .  Yes, this makes more sense than modifying the template.


________________________________

From: Walt Welton-Lair 
Sent: Friday, May 12, 2006 11:24 AM
To: 'users at mapguide.osgeo.org'
Subject: RE: [mapguide-users] Autodesk Help - OnSelectionChanged


One other test to try: open the attached HTM file in IE and verify you're getting OnSelectionChanged notifications.  You'll have to edit EMapViewerCtrl.js to point to your server.  Also assumes Sheboygan sample data is installed...

________________________________

From: Walt Welton-Lair 
Sent: Friday, May 12, 2006 10:59 AM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] Autodesk Help - OnSelectionChanged


I spent some time investigating this to see if I could reproduce what you were seeing (the selection event working for AJAX but not for DWF).
 
I first tried it with the latest code (in the OSGEO vault), and the mainframe's OnSelectionChanged handler was getting called for me when using DWF Viewer.  I then reverted to the MGO 1.0 code, and it still worked.  Finally I tried RC1, and it also worked.
 
For the tests above I was using a pre-release build of DWF Viewer 7 (which addresses the ActiveX activation issue).  Thinking that could be a factor, I reverted to DWF Viewer 6.5.  Once again it was working in all cases (latest code, 1.0, RC1).
 
For my test all I did was add some alerts statements to the OnSelectionChanged handlers and verified these were popping up.
 
I'm not sure why you guys are having problems with this.  I covered all the cases I could think of and didn't have any problems.
 
Note that adding code to the mainframe's OnSelectionChanged handler is correct, since this handler is common to both AJAX / DWF.
 
BTW, if you do get it to work you'll find there's a bug with the current DWF Viewer's OnSelectionChanged event: the event gets raised every time you click in the map (the selection object stored by the viewer is getting replaced, but no check is done to see if the set's contents are actually different).  This is fixed in DWF Viewer 7.
 
Walt

________________________________

From: Kori Maleski [mailto:km at pat.ca] 
Sent: Thursday, May 11, 2006 1:13 PM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] Autodesk Help - OnSelectionChanged


Juan,
 
I am in the un-documented realm I think.
 
I am actually making additions to the mapviewer code.  Here:
 
C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\mapviewernet
C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\viewerfiles
 
Some of it is documented in the Web API as functions you can call from your application.
Others are internal functions.
 
Cheers,
 
 
 
 
 
Kori Maleski  BSc. 
Senior Technical Consultant
 
Pacific Alliance Technologies
Suite 400 - 534 17 Ave. SW Calgary, AB CANADA T2S 0B1
TEL 403.770.1917 FAX 877.691.9149 TOL 877.691.9171 www.pat.ca <http://www.pat.ca/> 


________________________________

From: Butler, Juan P [mailto:jpbutler at co.pinellas.fl.us]
Sent: Thu 11/05/2006 6:59 AM
To: users at mapguide.osgeo.org
Subject: [BULK] RE: [mapguide-users] Autodesk Help - OnSelectionChanged



Hey Kori:

 

Where did you see the documentation for the "OnSelectionChanged" event?   I'm looking for the event handlers in MGOS that are similar to the ones I used with MG 6.x.   Thanks.

 

- Juan

 

________________________________

From: Kori Maleski [mailto:km at pat.ca] 
Sent: Wednesday, May 10, 2006 6:00 PM
To: users at mapguide.osgeo.org
Subject: [mapguide-users] Autodesk Help - OnSelectionChanged
Importance: High

 

Hi All,

 

Outstanding issue with some changes:

 

I need to call a function from the OnSelectionChanged event in the mainframe.templ of the mapviewer/mapagent.

I have a javascript function in the mainframe.templ file itself.

 

In MGO RC 1:

 

I called my function from the OnSelectionChanged event - and it worked smooth.

 

In MGO 1.0:

 

The code changed for both the AJAX and DWF viewer.

i.e. ajaxmappane.templ and dwfmappane.templ respectively.

 

The function call from the OnSelectionChanged no longer worked.

 

I have been fiddling trying to get it working again and have had success with the AJAX viewer but not the DWF Viewer.

 

 

For the AJAX viewer:

 

In the ajaxmappane.templ file;

In the ProcessFeatureInfo() function - I call my function.

 

Works like a charm.  Everytime I select, the function is executed.

 

For the DWF Viewer:

 

It now has that emaprelayer.html with an OnSelectionChanged event.

 

I try calling my function there:

      parent.parent.myfunction();

- doesn't work.

 

I try calling it from the OnSelectionChanged event in mainframe.templ.

       myfunction();

- doesn't work.

 

Doesn't work means stopping IIS, MapGuide Server - editing and saving - then restarting.

 

Can someone from Autodesk point me in the right direction?  

 

This is critical to mirroring 6.5 functionality in our clients applications.

 

Cheers,

 

 

 

 

 

 

Kori Maleski  BSc. 
Senior Technical Consultant

 

Pacific Alliance Technologies
Suite 400 - 534 17 Ave. SW Calgary, AB CANADA T2S 0B1
TEL 403.770.1917 FAX 877.691.9149 TOL 877.691.9171 www.pat.ca <http://www.pat.ca/> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20060512/aa1f8d81/attachment.html


More information about the Mapguide-users mailing list