[mapguide-users] How can we make the changes stored in the map
in programming methods ?
David Hequet
david.hequet at free.fr
Mon Jul 9 09:08:52 EDT 2007
To make changes permanent you have to work in Library repository insteed of
Session repository,
here is a php sample, after a modification, we save the layer :
IN SESSION:
// modification here..
$byteSource = new MgByteSource($layerDefinition,strlen($layerDefinition));
$byteSource->SetMimeType(MgMimeType::Xml);
$resourceID = new
MgResourceIdentifier("Session:$mgSessionId//$layerName.LayerDefinition");
$resourceService->SetResource($resourceID,$byteSource->GetReader(), null);
PERMANENT:
// modification here...
$byteSource = new MgByteSource($layerDefinition, strlen($layerDefinition));
$byteSource->SetMimeType(MgMimeType::Xml);
$resourceId =new
MgResourceIdentifier("Library://LayerName.LayerDefinition");
$resourceService->SetResource($resourceId, $byteSource->GetReader(), null);
Just do it :)
Tsai Chih-Cheng wrote:
>
> Hi all :
>
> I develop my application with MGOS and ASP.Net by using C#.
> I download the dotnetsamples from
> here<http://download.osgeo.org/mapguide/releases/1.2.0-rc1/docs/Samples/>
> .
> And I set up this sample successfully and it works fine.
>
> But I confuse that the "Basic Samples - Interacting With Layers - Rename
> Roads Layer" change the "Legend Label " from "Roads" to "Streets" of the
> "Roads Layer" is temporal ?
> I mean its changes is fine displayed in the mapFrame, but when I closed
> this
> page and reload this page, the changes didn't save in the map.
>
> So, anybody knows how to make the changes in programming method saved in
> the
> map permanently ?
>
> Thanks,
>
> Patrick
>
> _______________________________________________
> 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/How-can-we-make-the-changes-stored-in-the-map-in-programming-methods---tf4044102s16610.html#a11501357
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list