[mapguide-users] NamedCollection reference

Knight, Gregory Gregory.Knight.bra at cityofboston.gov
Sat Nov 4 10:03:38 EST 2006


Thats a fair point -- I really hadnt thought of it like that.  Until this particular issue, the code base had been identical for both viewers.  I planned to support both viewers - and give users the choice - until such a point where this wasnt practical anymore.  I might be inclinded to drop the DWF in favor of the AJAX viewer at this time if it weren't for AJAX's inability to handle multi-line labels at the moment.  
 
The javascript for the DWF viewer is in utilityfunctions.aspx - which gets loaded by dwfviewer.aspx (the parent application page) and called by by task page via the definition in my web layout.  (Does that make sense?)
 
In this case, I do not believe its possible to keep the script attached to a button - becuase I need to retrieve an XML selection from the viewer window - which the DWF viewer stores in the viewer itself -- unlike the AJAX viewer where this is stored/accessed from the server.  I am not certain of this, but was led to believe this by the feature / selection examples in Ch 3 of the Dev Guide.  

Each of the viewers has a different home page -- AJAXviewer.aspx and DWFviewer.aspx respectively, and the user is free to choose between the two.
 
Question tho, if it wasnt intended for applications to support both viewers, why the option in Studio to specify the supported viewer? :) 

I appreciate your thoughts... the wheels are turning a bit, and I may take a different approach heere.
 
Greg

________________________________

From: Jason Birch [mailto:Jason.Birch at nanaimo.ca]
Sent: Fri 11/3/2006 4:37 PM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] NamedCollection reference


I could be wrong, but I don't know of many people who have chosen to support both viewers.  This may be why you're not seeing much help with this particular problem.
 
It should be possible for you to deal with this though.  I can't say that I have any experience in this area, which will probably show in my questions.
 
Where are the scripts stored?  Are they entered directly into studio, or do they reside in your application template?  
 
Would it be possible to keep the script attached to the select button, but to have it call a function that you have in your application page, and then have the application page either make this a real script or a stub based on what the viewer type is?
 
How are you allowing the user to select between the viewers?
 
Jason

________________________________

From: Knight, Gregory
Sent: Fri 2006-11-03 1:15 PM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] NamedCollection reference



I finally found the problem here.  Slight typo on my part <redface>.


I finally got the tool working as desired with both the ajax and dwf viewers.<I feel like im having a conversation with myself here : ) >

 

Anyways, I do have a related question...  Due to the difference in which the AJAX and DWF viewers deal with selections, I had to implement the commands differently - AJAX as a Script and DWF as a URL.  I can hide the DWF URL command from the AJAX viewer because Invoke URL action supports this, but I cannot hide the AJAX SCRIPT command from the DWF viewer as Invoke Script doesn't seem to support this.  

 

Is there some other way (programatically perhaps?) that I can hide a Script command based on the client's viewer?

 

Greg

 

________________________________

From: Knight, Gregory 
Sent: Friday, November 03, 2006 10:12 AM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] NamedCollection reference

 

A little more info on my problem here:

 

I am working though the examples in ch 3 of the dev guide - working with the active selection - for both the dwf and ajax viewers.  

 

I have 2 pages or functions - one for each viewer - and the code is the same in both cases with the exception of the single line of code that gets the selection from the map.  As the dev guide explains, this is due to the different manner in which the dwf and ajax viewers deal with selections.

 

So, my DWF example is working.  I can select a feature on my map, and return feature data to my task pane.  My AJAX example isn't working, and I still get the error below.

Seems rather odd, since the code is the same with the noted exception.

 

Any insight here?


Greg

 

 

________________________________

From: Knight, Gregory 
Sent: Thursday, November 02, 2006 4:52 PM
To: users at mapguide.osgeo.org
Subject: [mapguide-users] NamedCollection reference

 

I am getting the following error when loading a mg page that retrieves feature properties from a selected feature.

 

Duplicate object.Duplicate object. Exception occurred in method CheckDuplicate at line 491 in file c:\build_tux_area\mgdev_opensource\common\service\data\NamedCollection.cpp  

 

How do I go about troubleshooting this?

 

Greg Knight

________________________________



The substance of this message, including any attachments, may be
confidential, legally
privileged and/or exempt from disclosure pursuant to Massachusetts
law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and
delete the material from any computer.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 11867 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapguide_users/attachments/20061104/b01827aa/attachment.bin


More information about the Mapguide_users mailing list