[mapguide-users] Simple Open Map in .NET Issues
Rock Beans
rockbeans at gmail.com
Thu Oct 22 16:47:54 EDT 2009
I create a session then use session to create site connection. I then
have issues with map.open(). I tried map name "Shebotgan" and I tried
using a resource indentifier. What am I doing wrong?
MapGuideApi.MgInitializeWebTier("C:\\Program Files
(x86)\\OSGeo\\MapGuide\\Web\\www\\webconfig.ini");
MgUserInformation userInfo = new MgUserInformation("Anonymous", "");
MgSite site = new MgSite();
site.Open(userInfo);
String mgSessionId = site.CreateSession();
MgUserInformation userInfoSession = new MgUserInformation(mgSessionId);
MgSiteConnection siteConnection = new MgSiteConnection();
siteConnection.Open(userInfoSession);
//MgResourceIdentifier resourceId = new
MgResourceIdentifier("Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition");
//create resource services
MgResourceService resourceSrvc =
(MgResourceService)siteConnection.CreateService(MgServiceType.ResourceService);
MgResourceIdentifier resourceId = new
MgResourceIdentifier("Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition");
MgMap map = new MgMap();
map.Create(resourceId, mapName);
map.Open(resourceSrvc, mapName);
More information about the mapguide-users
mailing list