<?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: How to use LocationToScreen in MVVM in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-use-locationtoscreen-in-mvvm/m-p/288038#M3399</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the unit used by OffsetX, OffsetY? The unit of the map's Spatial Reference?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jan 2018 20:57:31 GMT</pubDate>
    <dc:creator>MichaelThompson</dc:creator>
    <dc:date>2018-01-09T20:57:31Z</dc:date>
    <item>
      <title>How to use LocationToScreen in MVVM</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-use-locationtoscreen-in-mvvm/m-p/288033#M3394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to covert MapPoints to screen Points in my WPF application. As far as I can tell, this can only be accomplished through the MapView.LocationToScreen() method. What's the best way to access&amp;nbsp;the MapView component from&amp;nbsp;the rest of my application without compromising MVVM design?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 19:50:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-use-locationtoscreen-in-mvvm/m-p/288033#M3394</guid>
      <dc:creator>MichaelThompson</dc:creator>
      <dc:date>2018-01-09T19:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to use LocationToScreen in MVVM</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-use-locationtoscreen-in-mvvm/m-p/288034#M3395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The simple answer is no you can't without breaking with the MVVM design pattern. The moment you add screen coordinates to your view model, you just brought view-specific stuff into you view model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps if you can elaborate a little more why you need this, I can suggest a better way to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 20:02:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-use-locationtoscreen-in-mvvm/m-p/288034#M3395</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2018-01-09T20:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to use LocationToScreen in MVVM</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-use-locationtoscreen-in-mvvm/m-p/288035#M3396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for assisting, Morten!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am adding graphics to a GraphicsOverlay using Picture Markers. But, I want to be able to offset items that would collide on the screen. I was hoping to convert the MapPoint to Point using LocationToScreen, apply an x,y offset in screen pixels in cases where graphics would obscure each other, then covert back to a MapPoint using ScreenToLocation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 20:07:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-use-locationtoscreen-in-mvvm/m-p/288035#M3396</guid>
      <dc:creator>MichaelThompson</dc:creator>
      <dc:date>2018-01-09T20:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use LocationToScreen in MVVM</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-use-locationtoscreen-in-mvvm/m-p/288036#M3397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm I don't have good idea off the bat for that. Your offsets would also get invalidated the moment you zoom . It's probably better to have a list of features in you view model, and a converter in your view that converts them to graphics in an overlay.&lt;/P&gt;&lt;P&gt;Also note that you can use the offset properties on the symbol to "move" the points relative to the mappoint, without having to convert the screen coordinates back again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another approach is to push the LocationToScreen delegate into your viewmodel on load, and clear out on unload. It's probably not 100% purist MVVM, but neither is dealing with screen coordinates. IMHO a purist MVVM pattern is nice to have to brag about, but it quickly gets somewhat unpractical.&lt;/P&gt;&lt;P&gt;For instance most MVVM experts are clear on stating that it's totally OK to have view-specific code in your code-behind of the view (it's still part of the view), and that might include pushing things to/from the VM, as long what's sent across to the VM isn't view specific stuff in itself. Some purists like to point out how wrong that is, but that's what a purist is supposed to do &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 20:28:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-use-locationtoscreen-in-mvvm/m-p/288036#M3397</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2018-01-09T20:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use LocationToScreen in MVVM</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-use-locationtoscreen-in-mvvm/m-p/288037#M3398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't think about the Symbol offsets. I'll see if that meets my needs before angering the MVVM purity god.&amp;nbsp;Haha!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a bunch!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 20:33:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-use-locationtoscreen-in-mvvm/m-p/288037#M3398</guid>
      <dc:creator>MichaelThompson</dc:creator>
      <dc:date>2018-01-09T20:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use LocationToScreen in MVVM</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-use-locationtoscreen-in-mvvm/m-p/288038#M3399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the unit used by OffsetX, OffsetY? The unit of the map's Spatial Reference?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 20:57:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-use-locationtoscreen-in-mvvm/m-p/288038#M3399</guid>
      <dc:creator>MichaelThompson</dc:creator>
      <dc:date>2018-01-09T20:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to use LocationToScreen in MVVM</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-use-locationtoscreen-in-mvvm/m-p/288039#M3400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The units are in device-independent pixels (ie the same as the units you use for your UI layout)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2018 19:55:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-use-locationtoscreen-in-mvvm/m-p/288039#M3400</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2018-01-10T19:55:16Z</dc:date>
    </item>
  </channel>
</rss>

