<?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 View &amp;quot;drag&amp;quot; and &amp;quot;dragend&amp;quot; event? in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/view-quot-drag-quot-and-quot-dragend-quot-event/m-p/752254#M5126</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I am using ArcGIS API for JavaScript 4.10&lt;SPAN&gt;&amp;nbsp;and I want to implement a dragging of map view that will have a location pin (point graphic) in the center of the view. I have handled "drag" event of the view and used lat/long coordinates in view.extent.center like this :&lt;BR /&gt;&lt;BR /&gt;view.on("drag", function(evt) {&lt;BR /&gt; var locationGraphic = getCurrentLocationGraphics();&lt;BR /&gt; view.graphics.removeMany(locationGraphic);&lt;BR /&gt; view.graphics.add(new Graphic(new Point([view.extent.center.longitude,view.extent.center.latitude]), selectedLocation));&lt;BR /&gt; });&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;However, I can't handle setting of these coordinates when the dragging of the view ends. I want to set some values and trigger functions when dragging stops. How can I accomplish this?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Feb 2019 16:42:58 GMT</pubDate>
    <dc:creator>MiroslavMatovic</dc:creator>
    <dc:date>2019-02-15T16:42:58Z</dc:date>
    <item>
      <title>View "drag" and "dragend" event?</title>
      <link>https://community.esri.com/t5/developers-questions/view-quot-drag-quot-and-quot-dragend-quot-event/m-p/752254#M5126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I am using ArcGIS API for JavaScript 4.10&lt;SPAN&gt;&amp;nbsp;and I want to implement a dragging of map view that will have a location pin (point graphic) in the center of the view. I have handled "drag" event of the view and used lat/long coordinates in view.extent.center like this :&lt;BR /&gt;&lt;BR /&gt;view.on("drag", function(evt) {&lt;BR /&gt; var locationGraphic = getCurrentLocationGraphics();&lt;BR /&gt; view.graphics.removeMany(locationGraphic);&lt;BR /&gt; view.graphics.add(new Graphic(new Point([view.extent.center.longitude,view.extent.center.latitude]), selectedLocation));&lt;BR /&gt; });&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;However, I can't handle setting of these coordinates when the dragging of the view ends. I want to set some values and trigger functions when dragging stops. How can I accomplish this?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2019 16:42:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/view-quot-drag-quot-and-quot-dragend-quot-event/m-p/752254#M5126</guid>
      <dc:creator>MiroslavMatovic</dc:creator>
      <dc:date>2019-02-15T16:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: View "drag" and "dragend" event?</title>
      <link>https://community.esri.com/t5/developers-questions/view-quot-drag-quot-and-quot-dragend-quot-event/m-p/752255#M5127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/354105"&gt;Miroslav Matovic&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to trigger actions in the drag event in version 4.10 you can check the event attributes for 'action'.&lt;/P&gt;&lt;P&gt;You can add this inside your on.drag function.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;if (evt.action === 'start')&lt;/P&gt;&lt;P&gt;if (evt.action === 'update')&lt;/P&gt;&lt;P&gt;if (evt.action === 'end')&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;With these conditions you can trigger actions, when the drag startet, the dragging lasts or at the end of the dragging.&lt;/P&gt;&lt;P&gt;I hope this will help you and answers your questions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2019 12:17:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/view-quot-drag-quot-and-quot-dragend-quot-event/m-p/752255#M5127</guid>
      <dc:creator>TorbenKraft</dc:creator>
      <dc:date>2019-02-20T12:17:51Z</dc:date>
    </item>
  </channel>
</rss>

