[mapguide-users] Working with the current selection

Berdel, Brian brian.berdel at mcmtrans.com
Tue Apr 18 10:53:11 EDT 2006


I think the example may have been for AJAX viewer... I just noticed a
new development guide on the site. I am looking into it. 

-----Original Message-----
From: Berdel, Brian [mailto:brian.berdel at mcmtrans.com] 
Sent: Tuesday, April 18, 2006 10:27 AM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] Working with the current selection

Yes, thanks for the response. But if that was the case it would not get
by the line above it that says:

map.Open(resourceService, "myMap")

Additional error detail

Exception occurred in method MgResourceDefinitionManager.GetDocument at
line 856 in file
c:\build_tux_area\mgdev\server\src\services\resource\ResourceDefinitionM
anager.cpp

-----Original Message-----
From: Andy Morsell [mailto:amorsell at spatialgis.com] 
Sent: Tuesday, April 18, 2006 10:21 AM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] Working with the current selection

Are you sure that myMap is a valid name for a map in your repository?
It
should also be the name of the map you are working with when this code
is
executed. 


Andy Morsell, P.E.
Spatial Integrators, Inc.
http://www.SpatialGIS.com

-----Original Message-----
From: Berdel, Brian [mailto:brian.berdel at mcmtrans.com] 
Sent: Tuesday, April 18, 2006 7:11 AM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] Working with the current selection

Has anyone been able to work with the active selection in a map?  (I am
working with the sample in the development guide (Page 39-40)

I keep getting an error saying:  

Message	"Resource was not found:
Session:72234676-0000-1000-8004-00142260e7d1_en//myMap.Selection"
String

I am able to open the map and the session is valid.  I am basically
copying
the code (although I am converting to asp.net..)

Here is some of the code:

Dim mgSessionId As String = GetParameters()("SESSION") Dim matches As
Integer = 0  ' Variable to control output results.
Dim mapUpdated As Boolean = False
MapGuideApi.InitializeSockets()
InitializeWebTier()

Dim userInfo As MgUserInformation = New MgUserInformation(mgSessionId)
Dim
siteConnection As MgSiteConnection = New MgSiteConnection
siteConnection.Open(userInfo)
Dim resourceService As MgResourceService =
siteConnection.CreateService(MgServiceType.ResourceService)
Dim featureService As MgFeatureService =
siteConnection.CreateService(MgServiceType.FeatureService)
Dim queryOptions As New MgFeatureQueryOptions Dim map As New MgMap
map.Open(resourceService, "myMap") Dim Selection As New MgSelection(map)

ERROR OCCURS at the line below
Selection.Open(resourceService, "myMap")

Thanks for any suggestions



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




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


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





More information about the Mapguide-users mailing list