[mapguide-users] Help with opening maps from code behind

Ivan Milicevic Ivan.Milicevic at supranet.hr
Mon Dec 10 03:36:45 EST 2007


Hello,
 
is it possible to change map nae programaticly on runtime? I need to change map name, do something with layers and then render map image. I'm struggling with this for last 20h.
 
Please if somebody can help me. The problem is down below at commented line.
 
string mgSessionId = Request.QueryString["mgSessionId"].ToString();
string idK = Page.Request.QueryString["idK"];
string idZ = Page.Request.QueryString["idZ"];
string oznakaZdenca;
string cijeviKabela;
int i = 0;

bool showPreviousResults = false;
MgSiteConnection siteConnection = null;
InitializeWebTier();
MgUserInformation userInfo = new MgUserInformation(mgSessionId);
siteConnection = new MgSiteConnection();
siteConnection.Open(userInfo);
MgResourceService resourceService = siteConnection.CreateService(MgServiceType.ResourceService) as MgResourceService;
MgFeatureService featureService = siteConnection.CreateService(MgServiceType.FeatureService) as MgFeatureService;
MgMap map = new MgMap();
map.Open(resourceService, "1"); //opening map with name "1". I need to change map name here 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 4832 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapguide-users/attachments/20071210/f08dc78d/attachment.bin


More information about the mapguide-users mailing list