<?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 set overlay anchor point in ArcGISRuntime100.9.0 in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-set-overlay-anchor-point-in/m-p/92691#M1006</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Callout is a good suggestion from Joe - here is some sample code showing how this can be implemented:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/dbdc4452dfe816ad695719d947fb15a3d93d0891/src/WPF/ArcGISRuntime.WPF.Viewer/Samples/MapView/ShowCallout/ShowCallout.xaml.cs#L64" title="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/dbdc4452dfe816ad695719d947fb15a3d93d0891/src/WPF/ArcGISRuntime.WPF.Viewer/Samples/MapView/ShowCallout/ShowCallout.xaml.cs#L64"&gt;arcgis-runtime-samples-dotnet/ShowCallout.xaml.cs at dbdc4452dfe816ad695719d947fb15a3d93d0891 · Esri/arcgis-runtime-samp…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding Callouts and Popups:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Callouts are simple&amp;nbsp;UI types that can be added over the map and anchored to a coordinate with a leader/tail. Callouts have a configurable components including title, text, and symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Popups are part of the ArcGIS information model and can be configured for individual layers (or sublayers) in a map via a popup definition. They can also be used with graphics from graphics overlays and pixels from&amp;nbsp;rasters. Popups are intended to display the data of a feature, graphic or pixel (geo elements) in a way that is easier to understand than basic attributes in a row/column format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Popup sample code:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/WPF/ArcGISRuntime.WPF.Viewer/Samples/Layers/ShowPopup/ShowPopup.xaml" title="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/WPF/ArcGISRuntime.WPF.Viewer/Samples/Layers/ShowPopup/ShowPopup.xaml"&gt;arcgis-runtime-samples-dotnet/ShowPopup.xaml at master · Esri/arcgis-runtime-samples-dotnet · GitHub&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note the PopupViewer is pulled in from the Toolkit (&lt;A class="link-titled" href="https://github.com/Esri/arcgis-toolkit-dotnet/tree/main/src/Toolkit/Toolkit/UI/Controls/PopupViewer" title="https://github.com/Esri/arcgis-toolkit-dotnet/tree/main/src/Toolkit/Toolkit/UI/Controls/PopupViewer"&gt;arcgis-toolkit-dotnet/src/Toolkit/Toolkit/UI/Controls/PopupViewer at main · Esri/arcgis-toolkit-dotnet · GitHub&lt;/A&gt;).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Oct 2020 20:02:11 GMT</pubDate>
    <dc:creator>MichaelBranscomb</dc:creator>
    <dc:date>2020-10-19T20:02:11Z</dc:date>
    <item>
      <title>How to set overlay anchor point in ArcGISRuntime100.9.0</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-set-overlay-anchor-point-in/m-p/92689#M1004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am migrating code from .net 10.2. to 100.9.0.&amp;nbsp; We use overlays to show details when the user hovers on a feature. However I can't find how to set the coordinates of the overlay in 100.9.0 (so it appears by the mouse cursor).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;XAML:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; &amp;lt;esri:MapView x:Name="CenterlineHistoryMapView" WrapAround="True" MouseMove="CLHistMapView_OnMouseMove"&amp;gt;
    ...
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:MapView.Overlays&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:OverlayItemsControl&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Border x:Name="MapTooltip" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Background="White" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BorderBrush="Black" BorderThickness="2" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Padding="4" Margin="4" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HorizontalAlignment="Left" VerticalAlignment="Top" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Visibility="Collapsed"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;StackPanel x:Name="ToolTipStackPanel"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TextBlock Text="{Binding Attributes[LINE_DESCRIPTION], StringFormat='Line Description: {0}'}" Foreground="Black" FontWeight="Bold" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TextBlock Text="{Binding Attributes[ROUTE_ID], StringFormat='Route Id: {0}'}" Foreground="Black" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TextBlock Text="{Binding Attributes[DESIGNATOR], StringFormat='Designator: {0}'}" Foreground="Black" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/StackPanel&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Border&amp;gt;
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/esri:OverlayItemsControl&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:MapView.Overlays&amp;gt;
 &amp;lt;/esri:MapView&amp;gt;

&lt;STRONG&gt;Code behind:&lt;/STRONG&gt;

&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;// rectangle is derived from mouse event location

// I have migrated some of the code to the 100.9 API, like using &lt;EM&gt;IdentifyLayerAsync&lt;/EM&gt; method 
long[] rows = await _centerlineFeatureLayer.HitTestAsync(CenterlineHistoryMapView, rectangle);
if (rows != null &amp;amp;&amp;amp; rows.Length &amp;gt; 0)
{
 IEnumerable&amp;lt;Feature&amp;gt; features = await _centerlineFeatureLayer.FeatureTable.QueryAsync(rows);
 Feature feature = features.FirstOrDefault();
 if (feature != null)
 {
 _hoverOverlay.Graphics.Add(new Graphic(feature.Geometry, _hoverLineSymbol));
 MapTooltip.DataContext = feature;
 MapTooltip.Visibility = Visibility.Visible;
 
&lt;STRONG&gt; //Looking for the equivalent of this call in 100.9.0&lt;/STRONG&gt;
 Esri.ArcGISRuntime.Controls.ViewBase.SetViewOverlayAnchor(MapTooltip,
 CenterlineHistoryMapView.ScreenToLocation(screenPoint));
 }
 else
 {
 MapTooltip.Visibility = Visibility.Collapsed;
 }
}&lt;/PRE&gt;&lt;P&gt;On a side note, is would this be better suited as a popup? I'm not&amp;nbsp;understanding the difference between a popup and an overlay.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:00:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-set-overlay-anchor-point-in/m-p/92689#M1004</guid>
      <dc:creator>KoryKarr</dc:creator>
      <dc:date>2021-12-12T16:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to set overlay anchor point in ArcGISRuntime100.9.0</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-set-overlay-anchor-point-in/m-p/92690#M1005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have a sample readily available.&amp;nbsp; But I think the better approach in Runtime 100.9 would be to use a callout&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/net/latest/wpf/api-reference/html/M_Esri_ArcGISRuntime_UI_Controls_GeoView_ShowCalloutAt.htm" title="https://developers.arcgis.com/net/latest/wpf/api-reference/html/M_Esri_ArcGISRuntime_UI_Controls_GeoView_ShowCalloutAt.htm"&gt;GeoView.ShowCalloutAt Method (MapPoint, CalloutDefinition)&lt;/A&gt;.&amp;nbsp; This will allow you to setup the callout and then place in a location based on mouse location.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2020 19:23:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-set-overlay-anchor-point-in/m-p/92690#M1005</guid>
      <dc:creator>JoeHershman</dc:creator>
      <dc:date>2020-10-19T19:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to set overlay anchor point in ArcGISRuntime100.9.0</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-set-overlay-anchor-point-in/m-p/92691#M1006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Callout is a good suggestion from Joe - here is some sample code showing how this can be implemented:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/dbdc4452dfe816ad695719d947fb15a3d93d0891/src/WPF/ArcGISRuntime.WPF.Viewer/Samples/MapView/ShowCallout/ShowCallout.xaml.cs#L64" title="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/dbdc4452dfe816ad695719d947fb15a3d93d0891/src/WPF/ArcGISRuntime.WPF.Viewer/Samples/MapView/ShowCallout/ShowCallout.xaml.cs#L64"&gt;arcgis-runtime-samples-dotnet/ShowCallout.xaml.cs at dbdc4452dfe816ad695719d947fb15a3d93d0891 · Esri/arcgis-runtime-samp…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding Callouts and Popups:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Callouts are simple&amp;nbsp;UI types that can be added over the map and anchored to a coordinate with a leader/tail. Callouts have a configurable components including title, text, and symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Popups are part of the ArcGIS information model and can be configured for individual layers (or sublayers) in a map via a popup definition. They can also be used with graphics from graphics overlays and pixels from&amp;nbsp;rasters. Popups are intended to display the data of a feature, graphic or pixel (geo elements) in a way that is easier to understand than basic attributes in a row/column format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Popup sample code:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/WPF/ArcGISRuntime.WPF.Viewer/Samples/Layers/ShowPopup/ShowPopup.xaml" title="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/WPF/ArcGISRuntime.WPF.Viewer/Samples/Layers/ShowPopup/ShowPopup.xaml"&gt;arcgis-runtime-samples-dotnet/ShowPopup.xaml at master · Esri/arcgis-runtime-samples-dotnet · GitHub&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note the PopupViewer is pulled in from the Toolkit (&lt;A class="link-titled" href="https://github.com/Esri/arcgis-toolkit-dotnet/tree/main/src/Toolkit/Toolkit/UI/Controls/PopupViewer" title="https://github.com/Esri/arcgis-toolkit-dotnet/tree/main/src/Toolkit/Toolkit/UI/Controls/PopupViewer"&gt;arcgis-toolkit-dotnet/src/Toolkit/Toolkit/UI/Controls/PopupViewer at main · Esri/arcgis-toolkit-dotnet · GitHub&lt;/A&gt;).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2020 20:02:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-set-overlay-anchor-point-in/m-p/92691#M1006</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2020-10-19T20:02:11Z</dc:date>
    </item>
  </channel>
</rss>

