The Best solution for you.<br>You need to have a page (Asp or JSP or PHP) to create layer (like address marker...).<br>Create a hidden frame in frametaskbar (or framenotaskbar).<br>In a mainframe file (mainframe.aspx, mainframe.php
 or mainframe.jsp)<br>This file will write client page. Insert more code to write custom page with session parameter already created by mainframe file.<br>Chear,<br>Quandx<br><br><div><span class="gmail_quote">On 21/01/2008, 
<b class="gmail_sendername">Kenneth, GEOGRAF A/S</b> &lt;<a href="mailto:ks@geograf.dk">ks@geograf.dk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



  
  

<div bgcolor="#ffffff" text="#000000">
If you want to add it before the map loads, there is no session.<br>
This happens because the MapGuide AJAX viewer creates the session and
the runtime map.<br>
<br>
You have to create the LayerDefinition and the MapDefinition in the
Library repository.<br>
My best solution for this is to create a folder like &quot;Libray://Temp&quot;.<br>
Then create a GUID for each resource, and dump it here.<br>
After the AJAX viewer loads, you may delete the created items, as it
then uses the RuntimeMap in the session repository.<br>
<br>
<pre cols="72">Regards, Kenneth, GEOGRAF A/S<br></pre>
<br>
<br>
uXuf skrev:
<div><span class="e" id="q_1179b812bb248a1a_1"><blockquote type="cite">
  <pre>Its just a copy of the parcelmarker.xml from the samples. It works otherwise<br>with tasks, but I couldn&#39;t seem to get it work before the map is loaded.<br><br>uXuf<br><br><br>Jackie Ng wrote:<br>  </pre>
  <blockquote type="cite">
    <pre>What does the feature source xml look like? It seems that feature source<br>xml is an invalid document.<br><br>- Jackie<br><br><br><br><br>uXuf wrote:<br>    </pre>
    <blockquote type="cite">
      <pre>Hi all,<br>I am trying to add a dynamic layer to a map but before loading the map in<br>the map frame. It is supposed to work on some query string parameters and<br>should add a dynamic layer based on that information. I can add the Map
<br>to the session. I want to query the map from the Session Repository and<br>work on a copy, however I keep getting the<br>Session:xxxx//PointPlotter.FeatureSource Exception occurred in method<br>MgResourceDefinitionManager.GetDocument
 at line 476 in file<br>c:\build_bond_area\mapguide_open_source_v1.2\build_18.1\mgdev\server\src\services\resource\ResourceDefinitionManager.cpp <br>error.<br><br>Here is how I constructed the logic:<br>1- Make a new MgSite object
<br>2- Use MgSite-&gt;Open with a new MgUserInformation object<br>3- store the session ID in a variable<br>4- Check GET parameters<br>5- if records exists depending on the GET parameters, make a new<br>MgSiteConnection object
<br>6- Open this MgSiteConnection object with the session ID<br>7- Create a ResourceService by using MgSiteConnection-&gt;CreateService<br>8- Open the map by using $map-&gt;Open($resourceService, &#39;MapName&#39;) (EDIT: I
<br>used the $map-&gt;Create() function)<br>9- Verify and add layers (building upon the Sheboygan Find Parcel example<br>from MG 1.1 samples)<br><br>Do I need to explicity add a feature source to the session repository?<br>
But I think that&#39;s what exactly the CreatePointPlotterFeatureSource<br>function does from the findparcelsfunctions.php does in the samples.<br><br>And this error occurs when I call the CreatePointPlotterFeatureSource<br>
function. When I add a new FeatureSource in the form of<br>MgResourceIdentifier it works fine (i.e. no errors generated), but on the<br>first call to the above-mentioned function it crashes. Apparently it<br>doesn&#39;t execute even the first line which I changed into an &quot;echo&quot; for
<br>debugging purposes.<br><br>Anybody got any tips?<br><br>Regards,<br>uXuf<br><br><br>      </pre>
    </blockquote>
    <pre>    </pre>
  </blockquote>
  <pre>  </pre>
</blockquote>
</span></div></div>

<br>_______________________________________________<br>mapguide-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br><br></blockquote></div>
<br><br clear="all"><br>-- <br>Đỗ Xuân Quân