<?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: Rendering a map off-screen in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/rendering-a-map-off-screen/m-p/397491#M4711</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aaron, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you describe what is the use case and workflow in this use case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Feb 2016 09:52:17 GMT</pubDate>
    <dc:creator>AnttiKajanus1</dc:creator>
    <dc:date>2016-02-12T09:52:17Z</dc:date>
    <item>
      <title>Rendering a map off-screen</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/rendering-a-map-off-screen/m-p/397488#M4708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previously using the ArcGIS WPF Runtime I could create and initialize a map off-screen and render it to a bitmap using RenderTargetBitmap. I'm wondering if there is a preferred method to doing this as I'm currently unable to get a MapView to render unless it's in view, which isn't an option for this use case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// &lt;SPAN style="font-family: 'courier new', courier;"&gt;Sample code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Grid grid = new Grid(){Width=width, Height=height};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Map map = new Map(){Width=width, Height=height};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;map.Layers.Add(someLayer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;grid.Children.Add(map);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;grid.Measure(new Size(width, height));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;grid.Arrange(new Rect(new Size(width, height)));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;grid.UpdateLayout();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;map.Extent = someExtent;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;RenderTargetBitmap rtb = new RenderTargetBitmap(width, height, dpi, dpi, PixelFormats.Default);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;rtb.Render(grid);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// Do something with the image here&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// End Sample&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;The sample above is a simplified version of what I'm doing, but the fundamentals are the same. In the .NET 10.2.7 runtime this results in blank images. How can I recreate this behavior in the .NET Runtime? It appears that the map is never initialized unless I bring it into view.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 22:26:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/rendering-a-map-off-screen/m-p/397488#M4708</guid>
      <dc:creator>AaronHigh</dc:creator>
      <dc:date>2016-02-11T22:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Rendering a map off-screen</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/rendering-a-map-off-screen/m-p/397489#M4709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aaron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably it is because the Maps are initialized asynchronously after being created. Have you checked about this doc talks about Map initialization: &lt;A href="https://developers.arcgis.com/net/desktop/guide/maps-and-layers.htm#ESRI_SECTION1_428A8F08DDAC45EBB8D3AB37DF264339" title="https://developers.arcgis.com/net/desktop/guide/maps-and-layers.htm#ESRI_SECTION1_428A8F08DDAC45EBB8D3AB37DF264339"&gt;Maps and layers—ArcGIS Runtime SDK for .NET | ArcGIS for Developers&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, there is another doc mention about&amp;nbsp; &lt;A href="https://developers.arcgis.com/net/store/api-reference/html/M_Esri_ArcGISRuntime_Layers_Layer_InitializeAsync.htm" title="https://developers.arcgis.com/net/store/api-reference/html/M_Esri_ArcGISRuntime_Layers_Layer_InitializeAsync.htm"&gt;Layer.InitializeAsync Method&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 23:08:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/rendering-a-map-off-screen/m-p/397489#M4709</guid>
      <dc:creator>YueWu1</dc:creator>
      <dc:date>2016-02-11T23:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Rendering a map off-screen</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/rendering-a-map-off-screen/m-p/397490#M4710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yue,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for getting back to me, unfortunately neither of the provided methods seem to have any effect. The "Loaded", "LayerLoaded", and "ExtentChanged" events never fire unless the control is visible on screen. I was able to get &lt;EM&gt;just&lt;/EM&gt; the LayerLoaded to fire by calling the internal MapView::CreateCoreViewBase via reflection, but that still doesn't actually render the map or allow map updates to occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have any other insight that would be great, this is a bit of a show-stopper for us.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Feb 2016 00:06:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/rendering-a-map-off-screen/m-p/397490#M4710</guid>
      <dc:creator>AaronHigh</dc:creator>
      <dc:date>2016-02-12T00:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Rendering a map off-screen</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/rendering-a-map-off-screen/m-p/397491#M4711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aaron, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you describe what is the use case and workflow in this use case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Feb 2016 09:52:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/rendering-a-map-off-screen/m-p/397491#M4711</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2016-02-12T09:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Rendering a map off-screen</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/rendering-a-map-off-screen/m-p/397492#M4712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good Morning Antti,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The basic use case is to provide a secondary "map" that exists on a background thread that can provide images to a proprietary scene rendering engine for use as textures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;BitmapSource PrimaryMap::GetBitmapTexture(Envelope envelope, double imgWidth, double imgHeight)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The key for us here is that the secondary map is able to change extents without impacting the primary map while remaining hidden/off-screen. The secondary map will however always mirror the layers of the primary map.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 16:49:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/rendering-a-map-off-screen/m-p/397492#M4712</guid>
      <dc:creator>AaronHigh</dc:creator>
      <dc:date>2016-02-15T16:49:28Z</dc:date>
    </item>
  </channel>
</rss>

