[mapguide-users] .NET Fusion
Mike Adair
madair at dmsolutions.ca
Thu Apr 17 15:49:05 EDT 2008
Well perhaps I am misunderstanding something here then. It is possible
that the MGOS side of things are running in a .NET environment, but
unless you have converted the PHP scripts in fusion/MapGuide/php to
.NET, I don't see how Fusion can run at all. At a bare minimum you
would have to convert LoadMap.php, CreateSession.php and their includes.
In any case, the the map name is set as follows (in the PHP version of
LoadMap):
$mapName = uniqid($mapTitle);
$mapStateId = new MgResourceIdentifier("Session:" . $sessionID .
"//" . $mapName . "." . MgResourceType::Map);
where $mapTitle is the map name as set in MGOS and uniqid() returns a
unique ID based on the current time.
Mike
Berdel, Brian wrote:
> Mike it actually does because I am able to use the featurereader...I
> just cannot open a map. Anyone know how to get the ID?
>
> Brian Berdel
> McMahon Associates, Inc.
> p: 215.283.9444
> www.mcmtrans.com
>
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Mike Adair
> Sent: Thursday, April 17, 2008 12:51 PM
> To: MapGuide Users Mail List
> Subject: Re: [mapguide-users] .NET Fusion
>
> Fusion itself doesn't run under .NET, at least as far as I know.
>
> Mike
>
> Jackie C. Ng wrote:
>
>> The reason I ask is that fusion does map names differently from the
>>
> normal
>
>> ajax viewer. I think it's of the form [MapName][some long guid]
>>
> instead of
>
>> [MapName]
>>
>> - Jackie
>>
>>
>> Berdel, Brian wrote:
>>
>>
>>> Hi Jackie,
>>> I am actually passing it via a session variable from another Sub. It
>>>
> is
>
>>> the correct value. And like I said the code does work in the regular
>>> Ajax viewer.
>>>
>>> String smgMap = (Session["smgMap"]).ToString();
>>>
>>> Brian
>>>
>>> -----Original Message-----
>>> From: mapguide-users-bounces at lists.osgeo.org
>>> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Jackie C
>>>
> Ng
>
>>> Sent: Wednesday, April 16, 2008 8:45 PM
>>> To: mapguide-users at lists.osgeo.org
>>> Subject: Re: [mapguide-users] .NET Fusion
>>>
>>>
>>> Where are you getting that value of the variable smgMap ?
>>>
>>> - Jackie
>>>
>>>
>>> Berdel, Brian wrote:
>>>
>>>
>>>> If I try to access a map via .net fusion I always get this
>>>>
>>>>
>>> error...Code
>>>
>>>
>>>> works fine in regular viewer. I have heard conflicting reports of
>>>> Fusion and .NET can someone please clarify?
>>>>
>>>>
>>>>
>>>> MgUserInformation userInfo = new MgUserInformation(mgSessionId);
>>>>
>>>> MgSiteConnection siteConnection = new MgSiteConnection();
>>>>
>>>> siteConnection.Open(userInfo);
>>>>
>>>> MgResourceService resourceService =
>>>> siteConnection.CreateService(MgServiceType.ResourceService) as
>>>> MgResourceService;
>>>>
>>>> MgMap map = new MgMap();
>>>>
>>>> map.Open(resourceService, smgMap);
>>>>
>>>> Resource was not found:
>>>>
>>>>
>>>>
> Session:ba7530b4-ffff-ffff-800a-00142260e7d1_en_7F0000010AFC0AFB0AFA//So
>
>>>
>>>
>>>> leburyTwp.Map
>>>>
>>>> Description: An unhandled exception occurred during the execution of
>>>>
>>>>
>>> the
>>>
>>>
>>>> current web request. Please review the stack trace for more
>>>>
>>>>
>>> information
>>>
>>>
>>>> about the error and where it originated in the code.
>>>>
>>>> Exception Details: OSGeo.MapGuide.MgResourceNotFoundException:
>>>>
>>>>
>>> Resource
>>>
>>>
>>>> was not found:
>>>>
>>>>
>>>>
> Session:ba7530b4-ffff-ffff-800a-00142260e7d1_en_7F0000010AFC0AFB0AFA//So
>
>>>
>>>
>>>> leburyTwp.Map
>>>>
>>>> Source Error:
>>>>
>>>>
>>>>
>>>> Line 28: MgResourceService resourceService =
>>>> siteConnection.CreateService(MgServiceType.ResourceService) as
>>>> MgResourceService;
>>>>
>>>> Line 29: MgMap map = new MgMap();
>>>>
>>>> Line 30: map.Open(resourceService, smgMap);
>>>>
>>>>
>>>>
>>>> Brian Berdel
>>>>
>>>> McMahon Associates, Inc.
>>>>
>>>> p: 215.283.9444
>>>>
>>>> www.mcmtrans.com
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Brian Berdel
>>>>
>>>> Applications Development Manager
>>>>
>>>>
>>>>
>>>> McMahon Associates, Inc.
>>>>
>>>> 425 Commerce Drive, Suite 200
>>>>
>>>> Fort Washington, Pennsylvania 19034
>>>>
>>>> p: 215.283.9444
>>>>
>>>> f: 215.283.9858
>>>>
>>>> brian.berdel at mcmtrans.com
>>>>
>>>>
>>>>
>>>> <http://www.mcmtrans.com>
>>>>
>>>> New England | Mid-Atlantic | Florida
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> mapguide-users mailing list
>>>> mapguide-users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>>
>>>>
>>>>
>>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/.NET-Fusion-tp16722611s16610p16736574.html
>>> Sent from the MapGuide Users mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> mapguide-users mailing list
>>> mapguide-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>> _______________________________________________
>>> mapguide-users mailing list
>>> mapguide-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>
>>>
>>>
>>>
>> -----
>> http://themapguyde.blogspot.com
>>
>> http://www.linkedin.com/in/jackieng
>>
>>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
More information about the mapguide-users
mailing list