<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Copying a layer from one map to another. in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/copying-a-layer-from-one-map-to-another/m-p/46593#M1282</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;From what I noticed, the graphics in a layer is much like a datarow in a datatable.&amp;nbsp; A datarow can only belong to one datatable.&amp;nbsp; Seems like the same applies with a layer and the graphics that belong to it.&amp;nbsp; Here is what I did to copy a layer to another.&lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim gLayer As New GraphicsLayer
gLayer.ID = "Test"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each graphic In _selectLayer
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim g As New Graphic
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; g.Geometry = graphic.Geometry
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; g.Symbol = graphic.Symbol
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gLayer.Graphics.Add(g)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 21:49:19 GMT</pubDate>
    <dc:creator>MikeKaufman</dc:creator>
    <dc:date>2021-12-10T21:49:19Z</dc:date>
    <item>
      <title>Copying a layer from one map to another.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/copying-a-layer-from-one-map-to-another/m-p/46592#M1281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am doing a project in Silverlight and I need to copy a GraphicsLayer from a Map to another (the main application Map and a ChildWindow print Map). How can i do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried this but it doen't work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PrintingMap.Layers.Add(Map.Layers["MyGraphicsLayer"]);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 13:01:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/copying-a-layer-from-one-map-to-another/m-p/46592#M1281</guid>
      <dc:creator>jonataspovoas</dc:creator>
      <dc:date>2010-06-21T13:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Copying a layer from one map to another.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/copying-a-layer-from-one-map-to-another/m-p/46593#M1282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;From what I noticed, the graphics in a layer is much like a datarow in a datatable.&amp;nbsp; A datarow can only belong to one datatable.&amp;nbsp; Seems like the same applies with a layer and the graphics that belong to it.&amp;nbsp; Here is what I did to copy a layer to another.&lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim gLayer As New GraphicsLayer
gLayer.ID = "Test"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each graphic In _selectLayer
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim g As New Graphic
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; g.Geometry = graphic.Geometry
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; g.Symbol = graphic.Symbol
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gLayer.Graphics.Add(g)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:49:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/copying-a-layer-from-one-map-to-another/m-p/46593#M1282</guid>
      <dc:creator>MikeKaufman</dc:creator>
      <dc:date>2021-12-10T21:49:19Z</dc:date>
    </item>
  </channel>
</rss>

