hi kenneth! did you know what does" id" in <layer id=255.....> returned by selection xml mean? cause when i got the XmlSelection from map and i use it for getting layers it contains i've error wich say that layers is nothing but the selection is nt i've verifyed it the selection i got from map is not empty but the layers are nothing, so i think that can be caused by the "id" in <layer id=255.....> returned by the selection if that mean the session for example cause me when i create layer i do it with "library://......mapdefinition" and not "Session//....mapdefinition" so i think that if the id on <layer id=255.....> means the session used by user i think that layer contained on selection won't be known, but i'm not sure please if you have some idea tell it me, thanks a lot on advance.<br>
<br><div class="gmail_quote">2009/5/26 saloua wakrim <span dir="ltr"><<a href="mailto:wakrimsaloua.wakrim@gmail.com">wakrimsaloua.wakrim@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>hi! thanks alot for your help, i found exemple in phpsamples explaining how to get features from XMLSelection, i tried use it today, but i've prob wich i don't understand:</div>
<div> </div>
<div>i've prob with use the xml selection wich i get after user clic on polygone, this is javascript function i use to get selection:(i write it in textfiel and read it by Request.Form:</div>
<div> function test()<br> {<br> <br> k= document.formulaire.classe.value=carte.GetMapFrame().GetSelectionXML(); <br> </div>
<div> }</div>
<div>for get this selection i use this code</div>
<div> selectionXml = getValue("classe")</div>
<div><br> Private Function getValue(ByVal champ As String) As String<br> ' récupère la valeur du champ [champ] de la requête postée<br> ' qq chose ?<br> If Request.Form(champ) Is Nothing Then Return ""<br>
' on récupère la ou les valeurs du champ<br> Dim valeurs() As String = Request.Form.GetValues(champ)<br> Dim valeur As String = ""<br> Dim i As Integer<br> For i = 0 To valeurs.Length - 1<br>
valeur += valeurs(i)<br> Next<br> valeur = Server.UrlDecode(valeur)</div>
<div> Return valeur<br> End Function</div>
<div>after user clic on polygone and get xml selection , i use this code for filter and identify polygone ID:</div>
<div> Public Sub getselectionpartiel(ByVal map As MgMap, ByVal resourceService As MgResourceService, ByVal XmlSel As String)<br> <br> <br> Dim k = 0<br> If ((XmlSel <> Nothing) And (XmlSel <> "")) Then</div>
<div> <br> Dim selection As New MgSelection(map, XmlSel)<br> Dim Layers As MgReadOnlyLayerCollection = selection.GetLayers()</div>
<div> <br> If Not Layers.GetCount = 1 Then<br> Response.Write("More than one object was selected")</div>
<div> Exit Sub</div>
<div> End If</div>
<div><br> <br> <br> </div>
<div> Response.Write("calques selectionnés")<br> </div>
<div> <br> End If</div>
<div> End Sub<br> and i call this function like that:<br> getselectionpartiel(map, resourceSrvc, selectionXml)</div>
<div>it gives me this error:</div>
<div>"La référence d'objet n'est pas définie à une instance d'un objet." in the line:<br>(the object reference is not associated to the object instance)<br> If Not Layers.GetCount = 1 Then</div>
<div>i think that Layers is empty but when i display "selectionXml" by using:</div>
<div>Response.Write(selectionXml) it gives me the correct selection!!!<br>if you have some idea about the error i do,please tell it me, thanks a lot on advance<br><br></div>
<div class="gmail_quote">2009/5/26 Kenneth Skovhede, GEOGRAF A/S <span dir="ltr"><<a href="mailto:ks@geograf.dk" target="_blank">ks@geograf.dk</a>></span><div><div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff">The keyword for this is base64 encoding, see:<br><a href="http://lists.osgeo.org/pipermail/mapguide-users/2008-February/011245.html" target="_blank">http://lists.osgeo.org/pipermail/mapguide-users/2008-February/011245.html</a><br>
and<br><a href="http://www.mail-archive.com/mapguide-users@lists.osgeo.org/msg03312.html" target="_blank">http://www.mail-archive.com/mapguide-users@lists.osgeo.org/msg03312.html</a>
<div>
<div></div>
<div><br><pre cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre><br><br>saloua wakrim skrev:
<blockquote type="cite">
<div>i resolved coordinates point prob and transparency layer, now i want identify polygone wich i draw on map by user clic, i use GetSelectionXml() when user select polygone, this function gives me:</div>
<div> </div>
<div><?xml version="1.0" encoding="UTF-8"?><FeatureSet><Layer id="d610b562-ffff-ffff-8002-0016356155d0"><Class id="BufferLayerSchema:BufferClass"><ID>GQAAAA==</ID></Class></Layer></FeatureSet></div>
<div> </div>
<div>i want understand how can i identify polygone (id polygone) by this description i think that i must use </div>
<div><ID>GQAAAA==</ID> cause i've remarked that all what it changes when i select another polygone, but i don't see the relation with <ID>GQAAAA==</ID> end the ID wich i associate to my polygone when i create it.there is any relation?? thanks a lot on advance.<br>
<br></div>
<div class="gmail_quote">2009/5/20 Kenneth Skovhede, GEOGRAF A/S <span dir="ltr"><<a href="mailto:ks@geograf.dk" target="_blank">ks@geograf.dk</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff">UNIT is the coordinate system unit, eg. degrees, meters or inches.<br><br>If the layers and map have the correct coordinate systems assigned, <br>MapGuide will automatically convert the data to display correctly,<br>
so you get the correct map.<br><br>You do not have to work with the projection string manually.<br>Beware of trying to calculate coordinates manually based on the UNIT, because<br>projections are not always compatible just because the use the same UNIT.<br>
Instead, use the MgCoordinateSystem classes to convert points from one projection to another.
<div>
<div><br><pre cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre><br><br>saloua wakrim skrev:
<blockquote type="cite">
<div>but please if you know what that UNIT means in coordinates System say it me:</div>
<div> </div><font size="2" color="#0000ff">
<p><</p></font><font size="2" color="#800000">CoordinateSystem</font><font size="2" color="#0000ff">></font><font size="2">GEOGCS["WGS84 Lat/Long's, Degrees, -180 ==> +180",DATUM["D_WGS_1984",SPHEROID["World_Geodetic_System_of_1984",6378137,298.257222932867]],PRIMEM["Greenwich",0],<b><u>UNIT</u></b>["Degree",0.017453292519943295]]</font><font size="2" color="#0000ff"></</font><font size="2" color="#800000">CoordinateSystem</font><font size="2" color="#0000ff">> </font>cause i want draw polygone representing view of cam (dome) and it must be proportional to the real view of cam, and my layer must be added to map with another layer wich contains cams so i must know wich units is used on map(m, km, cm) or what? that what i do that i convert (m) to unit by this code:
<div> </div>
<div><font size="2" color="#008080">
<p>MgCoordinateSystemFactory</p></font><font size="2">csFactory = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgCoordinateSystemFactory</font><font size="2">(); </font><font size="2" color="#008080">MgCoordinateSystem</font><font size="2"> srs = csFactory.Create(map.GetMapSRS()); </font><font size="2" color="#008080">MgCoordinateSystemMeasure</font><font size="2"> mesure = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgCoordinateSystemMeasure</font><font size="2">(srs);
<p>distanceunits = pointa.Distance(pointb, mesure);</p>
<p>Response.Write(</p></font><font size="2" color="#800000">"distance entre les deux points du calque en unit‚: "</font><font size="2">+distanceunits.ToString());
<p>distancemeters = srs.ConvertCoordinateSystemUnitsToMeters(distanceunits);</p></font><font size="2">but i don't know if this layer (wich contains polygone) will be compatible with another layer or not? if you don't understand me say it me please. thanks or advance, i ask you cause i remark that you master more than onother mapguide developpers mapguide, thanks on advance.</font><font size="2"> </font><font size="2"> </font><br>
<br></div>
<div class="gmail_quote">2009/5/19 Kenneth Skovhede, GEOGRAF A/S <span dir="ltr"><<a href="mailto:ks@geograf.dk" target="_blank">ks@geograf.dk</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff">There is an example for MgCreateSdfParams() in the "buffer.(php|aspx|jsp)" file in the folder<br>C:\program files\MapGuideOpenSource2.0\WebServerExtensions\www\mapviewer(php|net|java)<br>
<br>It also shows how to set the coordinate system.<br>If your data has the correct projection, MapGuide will convert it to fit the map projection.<br>If that does not work, you have to manually convert the items, which is not a trivial procedure.
<div>
<div><br><pre cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre><br><br>saloua wakrim skrev:
<blockquote type="cite">hi! did you know lease how MgCreateSdfParams() works and what attributes i must give it cause ii think that the prob i have is coordinates i use for inserting polygone or line or point wich are not compatibl with map cordinates <br>
<br>
<div><span class="gmail_quote">2009/5/11, Kenneth Skovhede, GEOGRAF A/S <<a href="mailto:ks@geograf.dk" target="_blank">ks@geograf.dk</a>>:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff">Yes, that looks right.<br><br>You must also refresh the map (refresh/pan/zoom/etc.) in the browser via javascript.<br><br>In addition to my other suggestions, you can also check the error log for messages.
<div><span><br><pre cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre><br><br>saloua wakrim skrev:
<blockquote type="cite">
<div>hi! please i want know if this code is that what all i must do for adding new layer to map and see it in viewer frame or i must do some relation with the feature source i create in my code?? thanks on advance</div>
<div> </div>
<div><font size="2">
<p>myLayer = </p></font><font size="2" color="#0000ff">New</font><font size="2"> MgLayer(layerDefId, resourceSrvc)
<p>myLayer.SetName(myLayerName)</p>
<p>myLayer.SetLegendLabel(myLayerName)</p>
<p>myLayer.SetDisplayInLegend(</p></font><font size="2" color="#0000ff">True</font><font size="2">)
<p>myLayer.SetSelectable(</p></font><font size="2" color="#0000ff">False</font><font size="2">)
<p>map.GetLayers().Insert(0, myLayer)</p></font><font size="2">
<p>myLayer.ForceRefresh()</p></font><font size="2">map.Save(resourceSrvc)</font><br><br> </div>
<div class="gmail_quote">2009/5/10 Kenneth Skovhede, GEOGRAF A/S <span dir="ltr"><<a href="mailto:ks@geograf.dk" target="_blank">ks@geograf.dk</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff">The code looks alright.<br>Do you refresh the map afterwards?<br>What is in the "insertResults" ? <br>(There can be a hidden error, due to a bug in MapGuide)<br>Are you sure that the LayerDefinition matches the FeatureSource?<br>
Try to create the FeatureSource and LayerDefinition in "Library://" instead,<br>so you can examine the layer from Studio/Maestro.<br><pre cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre><br><br>saloua wakrim skrev:
<blockquote type="cite">
<div>
<div>
<div>i try the following code for displaying layer wich contains line in map, so i digitize a line, create temporary feature for this line, create a layer wich contains it and add it to the map. it doesn't give me some error but i can see the line in the map (i can draw it). Please help me. the code is following:</div>
<div> </div>
<div> <font size="2" color="#008080">
<p>String</p></font><font size="2">dataSource = </font><font size="2" color="#800000">"Session:"</font><font size="2"> + sessionid1 + </font><font size="2" color="#800000">"//"</font><font size="2"> + myLayerName + </font><font size="2" color="#800000">".FeatureSource"</font><font size="2">; </font><font size="2" color="#008080">MgResourceIdentifier</font><font size="2"> dataSourceId = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgResourceIdentifier</font><font size="2">(dataSource); </font><font size="2" color="#008080">MgFeatureService</font><font size="2"> featureSrvc = (</font><font size="2" color="#008080">MgFeatureService</font><font size="2">)siteConnection.CreateService(</font><font size="2" color="#008080">MgServiceType</font><font size="2">.FeatureService); </font><font size="2" color="#0000ff">if</font><font size="2"> (DoesLayerExist(myLayerName, map) == </font><font size="2" color="#0000ff">false</font><font size="2">)
<p>{</p>
<p> </p></font><font size="2" color="#008000">//create Feature Source </font><font size="2" color="#008080">MgClassDefinition</font><font size="2"> myClassDef = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgClassDefinition</font><font size="2">();
<p>myClassDef.SetName(myLayerName);</p>
<p>myClassDef.SetDescription(myLayerName + </p></font><font size="2" color="#800000">" Feature Source"</font><font size="2">);
<p>myClassDef.SetDefaultGeometryPropertyName(</p></font><font size="2" color="#800000">"SHPGEOM"</font><font size="2">); </font><font size="2" color="#008080">MgDataPropertyDefinition</font><font size="2"> prop = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgDataPropertyDefinition</font><font size="2">(</font><font size="2" color="#800000">"KEY"</font><font size="2">);
<p>prop.SetDataType(</p></font><font size="2" color="#008080">MgPropertyType</font><font size="2">.Int32);
<p>prop.SetAutoGeneration(</p></font><font size="2" color="#0000ff">true</font><font size="2">);
<p>prop.SetReadOnly(</p></font><font size="2" color="#0000ff">true</font><font size="2">);
<p>myClassDef.GetIdentityProperties().Add(prop);</p>
<p>myClassDef.GetProperties().Add(prop);</p>
<p>prop = </p></font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgDataPropertyDefinition</font><font size="2">(</font><font size="2" color="#800000">"ID"</font><font size="2">);
<p>prop.SetDataType(</p></font><font size="2" color="#008080">MgPropertyType</font><font size="2">.Int32);
<p>myClassDef.GetProperties().Add(prop);</p></font><font size="2" color="#008080">MgGeometricPropertyDefinition</font><font size="2"> geomProp = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgGeometricPropertyDefinition</font><font size="2">(</font><font size="2" color="#800000">"SHPGEOM"</font><font size="2">);
<p>geomProp.SetGeometryTypes(</p></font><font size="2" color="#008080">MgFeatureGeometricType</font><font size="2">.Curve);
<p>myClassDef.GetProperties().Add(geomProp);</p></font><font size="2" color="#008080">MgFeatureSchema</font><font size="2"> schema = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgFeatureSchema</font><font size="2">(myLayerName + </font><font size="2" color="#800000">"Schema"</font><font size="2">, myLayerName + </font><font size="2" color="#800000">"SchemaDesc"</font><font size="2">);
<p>schema.GetClasses().Add(myClassDef);</p></font><font size="2" color="#008080">MgCreateSdfParams</font><font size="2"> sdfParams = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgCreateSdfParams</font><font size="2">(</font><font size="2" color="#800000">"MGA-56 (GDA94 / MGA zone 56)"</font><font size="2">, map.GetMapSRS(), schema);
<p>featureSrvc.CreateFeatureSource(dataSourceId, sdfParams);</p>
<p> </p>
<p> </p></font><font size="2" color="#008000">//create layer </font><font size="2" color="#008000">//String layerDef = "Session:" + sessionid1 + "//" + myLayerName + ".LayerDefinition";</font><font size="2"> </font><font size="2" color="#008080">MgResourceIdentifier</font><font size="2"> layerDefId = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgResourceIdentifier</font><font size="2">(</font><font size="2" color="#800000">"Library://essaicalque/Redline.LayerDefinition"</font><font size="2">);
<p> </p>
<p> </p></font><font size="2" color="#008080">MgByteSource</font><font size="2"> content = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgByteSource</font><font size="2">(</font><font size="2" color="#800000">@"C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\essaiselect2\Layerdef.xml"</font><font size="2">);
<p>resourceSrvc.SetResource(layerDefId, content.GetReader(), </p></font><font size="2" color="#0000ff">null</font><font size="2">); </font><font size="2" color="#008000">//code enlev‚ d'ici: ajouter layer resource … la carte</font><font size="2"> </font><font size="2" color="#008000">//il faut ajouter l'autre code: add layer resource to map</font><font size="2"> </font><font size="2" color="#008000">//DOMDocument domdoc = new DOMdocument();</font><font size="2"> </font><font size="2" color="#008080">MgLayer</font><font size="2"> result=add_layer_resource_to_map(layerDefId,resourceSrvc,myLayerName,myLayerName,map);
<p>}</p></font><font size="2" color="#008080">MgInsertFeatures</font><font size="2"> insertFeatures = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgInsertFeatures</font><font size="2">(myLayerName, makeLine(</font><font size="2" color="#800000">"1"</font><font size="2">, x0, y0, x1, y1)); </font><font size="2" color="#008080">MgFeatureCommandCollection</font><font size="2"> commands = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgFeatureCommandCollection</font><font size="2">();
<p>commands.Add(insertFeatures);</p></font><font size="2" color="#0000ff">int</font><font size="2"> commandIndex = commands.IndexOf(insertFeatures); </font><font size="2" color="#008080">MgPropertyCollection</font><font size="2"> insertResults;
<p>insertResults = featureSrvc.UpdateFeatures(dataSourceId, commands, </p></font><font size="2" color="#0000ff">false</font><font size="2">); </font><font size="2" color="#008080">MgLayer</font><font size="2"> myLayer1 = map.GetLayers().GetItem(myLayerName) </font><font size="2" color="#0000ff">as</font><font size="2"> </font><font size="2" color="#008080">MgLayer</font><font size="2">;
<p>myLayer1.ForceRefresh();</p>
<p> </p></font><font size="2" color="#008000">//commands.Add(new MgInsertFeatures(myLayerName,makeLine("1", x0, y0, x1, y1)));
<p> </p></font><font size="2">
<p>map.Save(resourceSrvc); </p>
<p> </p><font size="2" color="#0000ff">
<p><</p></font><font size="2" color="#800000">script</font><font size="2"> </font><font size="2" color="#ff0000">runat</font><font size="2" color="#0000ff">=server></font><font size="2"> </font><font size="2" color="#008080">Boolean</font><font size="2"> result; </font><font size="2" color="#008080">MgPropertyCollection</font><font size="2"> makeLine(</font><font size="2" color="#008080">String</font><font size="2"> Name, </font><font size="2" color="#008080">Double</font><font size="2"> x0, </font><font size="2" color="#008080">Double</font><font size="2"> y0, </font><font size="2" color="#008080">Double</font><font size="2"> x1, </font><font size="2" color="#008080">Double</font><font size="2"> y1)
<p>{ </p></font><font size="2" color="#008080">MgPropertyCollection</font><font size="2"> PropertyCollection = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgPropertyCollection</font><font size="2">(); </font><font size="2" color="#008080">MgInt32Property</font><font size="2"> nameProperty = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgInt32Property</font><font size="2">(</font><font size="2" color="#800000">"ID"</font><font size="2">, 1);
<p>PropertyCollection.Add(nameProperty); </p></font><font size="2" color="#008080">MgWktReaderWriter</font><font size="2"> wktReaderWriter = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgWktReaderWriter</font><font size="2">(); </font><font size="2" color="#008080">MgAgfReaderWriter</font><font size="2"> agfReaderWriter = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgAgfReaderWriter</font><font size="2">(); </font><font size="2" color="#008080">MgGeometry</font><font size="2"> geometry = wktReaderWriter.Read(</font><font size="2" color="#800000">"LINESTRING XY ("</font><font size="2"> + x0 + </font><font size="2" color="#800000">" "</font><font size="2"> + y0 + </font><font size="2" color="#800000">","</font><font size="2"> + x1 + </font><font size="2" color="#800000">" "</font><font size="2"> + y1 + </font><font size="2" color="#800000">")"</font><font size="2">) </font><font size="2" color="#0000ff">as</font><font size="2"> </font><font size="2" color="#008080">MgLineString</font><font size="2">; </font><font size="2" color="#008000">//MgGeometry geometry = wktReaderWriter.Read("LINESTRING(3 4,10 50,20 25)") as MgLineString; </font><font size="2" color="#008080">MgByteReader</font><font size="2"> geometryByteReader = agfReaderWriter.Write(geometry); </font><font size="2" color="#008080">MgGeometryProperty</font><font size="2"> geometryProperty = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgGeometryProperty</font><font size="2">(</font><font size="2" color="#800000">"SHPGEOM"</font><font size="2">, geometryByteReader);
<p>PropertyCollection.Add(geometryProperty); </p></font><font size="2" color="#0000ff">return</font><font size="2"> PropertyCollection;
<p>} </p></font><font size="2" color="#008080">
<p>Boolean</p></font><font size="2">DoesLayerExist(</font><font size="2" color="#008080">String</font><font size="2"> LayerName, </font><font size="2" color="#008080">MgMap</font><font size="2"> Map)
<p>{ </p></font><font size="2" color="#008080">MgLayerCollection</font><font size="2"> layers = Map.GetLayers();
<p>result = (layers.Contains(myLayerName));</p></font><font size="2" color="#0000ff">return</font><font size="2"> result;
<p>}</p></font><font size="2" color="#008080">MgLayer</font><font size="2"> add_layer_resource_to_map(</font><font size="2" color="#008080">MgResourceIdentifier</font><font size="2"> layerresourceid, </font><font size="2" color="#008080">MgResourceService</font><font size="2"> rs, </font><font size="2" color="#008080">String</font><font size="2"> layername, </font><font size="2" color="#008080">String</font><font size="2"> layerlegendlabel, </font><font size="2" color="#008080">MgMap</font><font size="2"> map)
<p>{</p></font><font size="2" color="#008080">MgLayer</font><font size="2"> myLayer = </font><font size="2" color="#0000ff">new</font><font size="2"> </font><font size="2" color="#008080">MgLayer</font><font size="2">(layerresourceid, rs);
<p>myLayer.SetName(layername);</p>
<p>myLayer.SetLegendLabel(layerlegendlabel);</p>
<p>myLayer.SetDisplayInLegend(</p></font><font size="2" color="#0000ff">true</font><font size="2">);
<p>myLayer.SetSelectable(</p></font><font size="2" color="#0000ff">true</font><font size="2">);
<p> </p></font><font size="2" color="#0000ff">if</font><font size="2"> (!map.GetLayers().Contains(layername))
<p>{</p>
<p>map.GetLayers().Insert(0, myLayer);</p>
<p>}</p>
<p>myLayer.SetVisible(</p></font><font size="2" color="#0000ff">true</font><font size="2">);
<p>myLayer.ForceRefresh();</p>
<p>map.Save(resourceSrvc);</p></font><font size="2" color="#0000ff">return</font><font size="2"> myLayer;
<p>}</p></font><font size="2" color="#0000ff">
<p></</p></font><font size="2" color="#800000">script</font><font size="2" color="#0000ff">></font>
<p> </p>
<p> </p>
<p> </p></font></div></div></div><pre><hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre></blockquote></div><br>_______________________________________________<br>mapguide-users mailing list<br><a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a><br><a 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><pre><hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre></blockquote></span></div></div><br>_______________________________________________<br>mapguide-users mailing list<br><a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a><br>
<a 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><pre><hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre></blockquote></div></div></div><br>_______________________________________________<br>mapguide-users mailing list<br><a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a><br>
<a 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><pre><hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre></blockquote></div></div></div><br>_______________________________________________<br>mapguide-users mailing list<br><a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a><br>
<a 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><pre><hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre></blockquote></div></div></div><br>_______________________________________________<br>mapguide-users mailing list<br><a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
<br></blockquote></div></div></div><br>
</blockquote></div><br>