[mapguide-users] PHP -> .NET Active Selection

Berdel, Brian brian.berdel at mcmtrans.com
Wed Apr 19 17:09:16 EDT 2006


While I am able to work with the Active Selection for the AJAX viewer in
NET, I am not able to come up with a solution for the DWG viewer in
NET. 

 

The development sample using PHP says to: Can anyone help me with a .NET
solution to this?  

 

One method to do this is to create a JavaScript function, then call this
function from the Viewer using an Invoke Script command. In an HTML page
that includes an embedded Viewer, add the following JavaScript function:

function listSelected()

{

   xmlSel = ViewerFrame.mapFrame.GetSelectionXML(); 

   params = new Array("SESSION", 

      ViewerFrame.mapFrame.GetSessionId(), "SELECTION", xmlSel); 

   ViewerFrame.formFrame.Submit("../devguide/dwfselection.php", 

      params, "taskPaneFrame");

}

In your web layout, create a new command and add it to the task list.
Set the command type to Invoke Script. Set the script to invoke to 

parent.listSelected(); 

Create a page named dwfselection.php in the devguide directory. This can
be exactly the same as Example: Setting the Active Selection
<file:///C:\Documents%20and%20Settings\bberdel\Desktop\MgOpenSourceDevGu
ide\WS1a9193826455f5ff9110c71085341391d-4846.html> , with one
modification. Replace the AJAX-specific code with the following:

$selection = new MgSelection($map, $_POST['SELECTION']);

 

 

________________________________

From: Andy Morsell [mailto:amorsell at spatialgis.com] 
Sent: Wednesday, April 19, 2006 4:06 PM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] RE: ODBC problem...

 

Property_joined is a standard query (not a table) in my Access database.
Yes, I have a parcel id (PID field) in that query that matches the PID
field in my SDF file.  It does sound like we are doing things the same
way.

 

Andy 

________________________________

From: Butler, Juan P [mailto:jpbutler at co.pinellas.fl.us] 
Sent: Wednesday, April 19, 2006 12:49 PM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] RE: ODBC problem...

Andy:

 

What's the property_joined table you have?  I have a table that contains
the parcel data with a column that matches the SDF_ID.    I'm assuming
your property_joined table is similar, correct?  You didn't do anything
special to this table, did you?

 

Juan Butler - Senior Programmer/Analyst
GIS Applications
Pinellas County Information Systems
jpbutler at pinellascounty.org

 

 

________________________________

From: Andy Morsell [mailto:amorsell at spatialgis.com] 
Sent: Wednesday, April 19, 2006 3:01 PM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] RE: ODBC problem...

 

Here are some screenshots.  I think that will help clarify things.

Andy 

________________________________

From: Butler, Juan P [mailto:jpbutler at co.pinellas.fl.us] 
Sent: Wednesday, April 19, 2006 11:40 AM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] RE: ODBC problem...

I'm using the Access database as the secondary and still not able to
pull up the graphics connecting to the secondary.   In the Feature Data
Setup for the layer, I go and choose the Access database in the Feature
Class dropdown.  Is this not correct?  If I don't do this, the Access
fields won't show up.   

 

Juan Butler - Senior Programmer/Analyst
GIS Applications
Pinellas County Information Systems
jpbutler at pinellascounty.org

  

 

________________________________

From: Andy Morsell [mailto:amorsell at spatialgis.com] 
Sent: Wednesday, April 19, 2006 2:06 PM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] RE: ODBC problem...

 

Thanks for the clarification Dave.  I hadn't even looked at my spatial
datasource to notice that there is now a Join portion of the dialog at
that level.  I was thinking the join was only defined from the tabular
datasource.  Now that I have set it up there (pretty much using the same
steps I previously outlined) it is working fine.  I can display my
parcel polygons with tooltips and properties derived from the secondary
Access database.

 

It is a little confusing that it can be done the other way around and
that a layer can be seemingly created from that while choosing the
geometry feature from the secondary datasource.  That process should
probably be changed in Studio to prevent that from happening.

 

I'm still having problems with point data from an ODBC resource, but
will do some more experimenting later.

Andy 

________________________________

From: Dave Wilson [mailto:dave.wilson at autodesk.com] 
Sent: Wednesday, April 19, 2006 7:26 AM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] RE: ODBC problem...

Am I correct in understanding you are using the spatial resource as the
Secondary resource? The Spatial resource needs to be the primary
resource if this is what the layer is to be based on. The join is
generally for attaching attribute data to spatial data such as adding
properties from an Access table to an SDF.

 

Point data from an ODBC resource should also work as a primary resource.

 

Dave Wilson

 

________________________________

From: Andy Morsell [mailto:amorsell at spatialgis.com] 
Sent: Tuesday, April 18, 2006 6:22 PM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] RE: ODBC problem...

Here are the steps I took to create the join.  Note that I wasn't able
to do with anything with the join in terms of creating a layer from it,
however.

*	Once your datasource is setup and you can see the tables listed
in the Refine Data Setup area, click the New Extended Feature Class
button.  
*	Choose your other datasource in the repository that you are
connecting to 
*	Choose the Primary Feature class (table) 
*	Click on your New Join below the Extension you just created 
*	You will most likely only have one option for the Secondary
class (table) 
*	Select your Primary Column and Secondary Column fields.  These
are the key fields tying together your primary (tabular) and secondary
(spatial) datasources. 

If you get this far, please let us know if you can successfully create a
layer where you can view the resultant objects.  I also tried creating a
layer from X and Y points in a table from this database and, again, was
not able to view the resultant geometry.

 

Andy Morsell 

-----Original Message----- 
From: Thud732 [mailto:devlin.fung at sapience360.com
<mailto:devlin.fung at sapience360.com> ] 
Sent: Tuesday, April 18, 2006 4:30 PM 
To: users at mapguide.osgeo.org 
Subject: [mapguide-users] RE: ODBC problem... 

 

Hi Andy: 

Can you please outline your 'join connection' steps? I was able to
establish a successful test connection, but failed when joining.

Thank you. 
TC 
-- 
View this message in context:
http://www.nabble.com/Failed-to-test-the-Web-Server-Extensions-after-ins
tallation-t1432431.html#a3978903
<http://www.nabble.com/Failed-to-test-the-Web-Server-Extensions-after-in
stallation-t1432431.html#a3978903> 

Sent from the OSGeo MapGuide forum at Nabble.com. 

 

--------------------------------------------------------------------- 
To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org 
For additional commands, e-mail: users-help at mapguide.osgeo.org 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide_users/attachments/20060419/5a8533e2/attachment.html


More information about the Mapguide_users mailing list