Hi,
I am a newbie. I want to save a user created layer to the map permanently. I
am using the layer created by the code in "change_layers_via_dom.php" given
in the developer guide. It gives the layer of parcels which has been built
after 1980. Now I want to save this layer to the library and add this layer
to the map permanently. I am using the code

$byteSource = new MgByteSource($layerDefinition, strlen($layerDefinition));
$byteSource->SetMimeType(MgMimeType::Xml);
$resourceId = new
MgResourceIdentifier("Library://Samples/Sheboygan/Layers/RecentlyBuilt.LayerDefinition");
$resourceService->SetResource($resourceId, $byteSource->GetReader(), null);
$map->Save($resourceService);

This code successfully saves the new layer to the library but when I refresh
the page it no longer appears on the map I mean it does not adds this layer
to map permanently. Kindly tell me how can I get the layer appear on the map
permanently. It would be very helpful If someone could provide me some code
also.

With best regards,
Chandan

P.S.: I am using mapguide open source release 2.1 beta 1 and I am coding in
PHP.
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to