<?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 Issue while drawing a custom HTML label on map panning in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-while-drawing-a-custom-html-label-on-map/m-p/1267003#M80527</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I have a feature requirement where I need to draw and point and then a second point and a curved great circle line connecting the 2 points on the map. The second point needs to have a label. The label here is a normal HTML label which is being drawn outside the esri map[the label moves with the second point]. I can generally show[with minor offset] the label using the lat-long of my second point. I normally use the 'drag'&amp;nbsp; , 'hover' and 'click' events and all the events give the exact screen coordinates [the actual device screen coordinates[clientX and clientY] and not esri map (toScreen)]. So all works fine while drawing the 2 points and the great circle line. Once the second point is drawn, all the graphic objects (+ HTML label)stay fixed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue -&lt;/P&gt;&lt;P&gt;Once the 2 points and the great circle line is drawn, the user can pan the map to any part of the world. When I come back to the same lat-long[by dragging/goTo()] where my 2 points and great circle line was drawn , the screen point value changes [using the toScreen method]. I am guessing the reason is that the user can come to that same point by moving clock-wise or anti-clock wise[dragging] over the full map view. Due to the extreme panning of the map, the top left of the view changes and this changes the result of the toScreen.&lt;/P&gt;&lt;P&gt;Note: When I initially draw the graphics, my toScreen returns X value of around 700, but after panning the map, the toScreen returns around 8000+. If I convert this[8000+] screen coordinate value to lat-long [using toMap], I get the correct lat-long again. Obviously I can show a label at around 700px on my screen, but I cannot show a label at 8000px.&lt;/P&gt;&lt;P&gt;Is there any way I can convert this 8000 screen point value back to my 700px clientX value?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any other approach of doing this?&lt;/P&gt;</description>
    <pubDate>Mon, 13 Mar 2023 10:58:28 GMT</pubDate>
    <dc:creator>ManasDas</dc:creator>
    <dc:date>2023-03-13T10:58:28Z</dc:date>
    <item>
      <title>Issue while drawing a custom HTML label on map panning</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-while-drawing-a-custom-html-label-on-map/m-p/1267003#M80527</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I have a feature requirement where I need to draw and point and then a second point and a curved great circle line connecting the 2 points on the map. The second point needs to have a label. The label here is a normal HTML label which is being drawn outside the esri map[the label moves with the second point]. I can generally show[with minor offset] the label using the lat-long of my second point. I normally use the 'drag'&amp;nbsp; , 'hover' and 'click' events and all the events give the exact screen coordinates [the actual device screen coordinates[clientX and clientY] and not esri map (toScreen)]. So all works fine while drawing the 2 points and the great circle line. Once the second point is drawn, all the graphic objects (+ HTML label)stay fixed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue -&lt;/P&gt;&lt;P&gt;Once the 2 points and the great circle line is drawn, the user can pan the map to any part of the world. When I come back to the same lat-long[by dragging/goTo()] where my 2 points and great circle line was drawn , the screen point value changes [using the toScreen method]. I am guessing the reason is that the user can come to that same point by moving clock-wise or anti-clock wise[dragging] over the full map view. Due to the extreme panning of the map, the top left of the view changes and this changes the result of the toScreen.&lt;/P&gt;&lt;P&gt;Note: When I initially draw the graphics, my toScreen returns X value of around 700, but after panning the map, the toScreen returns around 8000+. If I convert this[8000+] screen coordinate value to lat-long [using toMap], I get the correct lat-long again. Obviously I can show a label at around 700px on my screen, but I cannot show a label at 8000px.&lt;/P&gt;&lt;P&gt;Is there any way I can convert this 8000 screen point value back to my 700px clientX value?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any other approach of doing this?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 10:58:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-while-drawing-a-custom-html-label-on-map/m-p/1267003#M80527</guid>
      <dc:creator>ManasDas</dc:creator>
      <dc:date>2023-03-13T10:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Issue while drawing a custom HTML label on map panning</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-while-drawing-a-custom-html-label-on-map/m-p/1267698#M80551</link>
      <description>&lt;P&gt;Strange!! I implemented the arcGIS popup and observed the same issue. Do you convert the long-lat of the 'location' field to ScreenPoint using toScreen?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 18:21:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-while-drawing-a-custom-html-label-on-map/m-p/1267698#M80551</guid>
      <dc:creator>ManasDas</dc:creator>
      <dc:date>2023-03-14T18:21:01Z</dc:date>
    </item>
  </channel>
</rss>

