<?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: Location widget , visualising location accuracy in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/location-widget-visualising-location-accuracy/m-p/1164445#M77018</link>
    <description>&lt;P&gt;This was kind of fun to do. Geolocation coordinates return an accuracy in meters.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates/accuracy" target="_blank" rel="noopener"&gt;https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates/accuracy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can use this value with the view resolution to figure out the size of the marker you want to display.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#resolution" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#resolution&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I did this math right, I'm sure someone will correct if I didn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;track.on("track", ({ position }) =&amp;gt; {
    accuracy = position.coords.accuracy;
    currentCoords = position.coords;
    // divide accuracty (meters) by maps resolution (pixels)
    const size = `${accuracy / view.resolution}px`;
    symbol.size = size;
    layer.removeAll();
    layer.add({
    geometry: {
        type: "point",
        latitude: currentCoords.latitude,
        longitude: currentCoords.longitude
    },
    symbol
    });
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/odoe/pen/zYpmEMB?editors=1000" target="_blank" rel="noopener"&gt;https://codepen.io/odoe/pen/zYpmEMB?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The Geolocation API also returns a heading you can use to rotate you symbol, which would be simplest, or you could calculate how to draw a short line in that heading. I'll leave that up to you.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates/heading" target="_blank" rel="noopener"&gt;https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates/heading&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Apr 2022 16:02:25 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2022-04-14T16:02:25Z</dc:date>
    <item>
      <title>Location widget , visualising location accuracy</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/location-widget-visualising-location-accuracy/m-p/1164381#M77015</link>
      <description>&lt;P&gt;Is it possible to show location accuracy in map like location headsup while rotating mobile as it is shown in below image?&lt;/P&gt;&lt;P&gt;Please provide the solution to get this 'blue-cone' in arcgis map.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LakshmiPriyadharshini_0-1649942809074.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/38895iD7B254BAB1CB7D35/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LakshmiPriyadharshini_0-1649942809074.png" alt="LakshmiPriyadharshini_0-1649942809074.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 13:27:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/location-widget-visualising-location-accuracy/m-p/1164381#M77015</guid>
      <dc:creator>LakshmiPriyadharshini</dc:creator>
      <dc:date>2022-04-14T13:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Location widget , visualising location accuracy</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/location-widget-visualising-location-accuracy/m-p/1164445#M77018</link>
      <description>&lt;P&gt;This was kind of fun to do. Geolocation coordinates return an accuracy in meters.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates/accuracy" target="_blank" rel="noopener"&gt;https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates/accuracy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can use this value with the view resolution to figure out the size of the marker you want to display.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#resolution" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#resolution&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I did this math right, I'm sure someone will correct if I didn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;track.on("track", ({ position }) =&amp;gt; {
    accuracy = position.coords.accuracy;
    currentCoords = position.coords;
    // divide accuracty (meters) by maps resolution (pixels)
    const size = `${accuracy / view.resolution}px`;
    symbol.size = size;
    layer.removeAll();
    layer.add({
    geometry: {
        type: "point",
        latitude: currentCoords.latitude,
        longitude: currentCoords.longitude
    },
    symbol
    });
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/odoe/pen/zYpmEMB?editors=1000" target="_blank" rel="noopener"&gt;https://codepen.io/odoe/pen/zYpmEMB?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The Geolocation API also returns a heading you can use to rotate you symbol, which would be simplest, or you could calculate how to draw a short line in that heading. I'll leave that up to you.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates/heading" target="_blank" rel="noopener"&gt;https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates/heading&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 16:02:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/location-widget-visualising-location-accuracy/m-p/1164445#M77018</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-04-14T16:02:25Z</dc:date>
    </item>
  </channel>
</rss>

