<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=us-ascii" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
The function BuildLayerDefinitionContent() builds the LayerDefinition
from an xml template:<br>
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Web/src/mapviewerjava/buffer.jsp#L432">http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Web/src/mapviewerjava/buffer.jsp#L432</a><br>
<br>
This saves the modified xml:<br>
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Web/src/mapviewerjava/buffer.jsp#L131">http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Web/src/mapviewerjava/buffer.jsp#L131</a><br>
<br>
And here the layer is added to the map:<br>
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Web/src/mapviewerjava/buffer.jsp#L173">http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Web/src/mapviewerjava/buffer.jsp#L173</a><br>
<br>
And finally the map is saved:<br>
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Web/src/mapviewerjava/buffer.jsp#L347">http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Web/src/mapviewerjava/buffer.jsp#L347</a><br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
vittorio skrev:
<blockquote cite="mid:1247732946317-3267725.post@n2.nabble.com"
 type="cite">
  <pre wrap="">Hi Kenneth,
I gave a look at buffer.jsp file, but I have not found anything about xml. I
would like to understand how to add programmatically a layer from an xml
file. 

Vittorio.



Kenneth Skovhede, GEOGRAF A/S wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Look at the buffer.* files in your MapGuide installation:
C:\Program 
Files\MapGuideOpenSource\WebExtensions\www\mapviewer(php|net|java)\buffer.(aspx|jsp|php).

If you are using .Net, you can also try the MaestroAPI:
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/samples/ModifyLayerFilter">http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/samples/ModifyLayerFilter</a>

The approach used in the MaestroAPI example is the same you would use
in the other languages.

Regards, Kenneth Skovhede, GEOGRAF A/S



vittorio skrev:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Thanks Kenneth for your reponse.

I need to see code examples to load a new layer programmatically from a
xml
modified file.
Can you post me kindly?

Vittorio.

      </pre>
    </blockquote>
    <pre wrap="">

    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
</body>
</html>