<?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: esri.dijit.Scalebar : Issues in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-dijit-scalebar-issues/m-p/521318#M48587</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the feedback.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When zooming out to the extent covering the whole world under web mercator projection or GCS, there is no meaningful scale value. I attach a screenshot of google maps, which behaves similarly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The reason behind the scenes is those projections distort the map, hence the scale value varies in different area. So there is not a single scale value which can represent the whole map. The implementation of the scalebar picks the scale value at the location of itself to represent the map. In a relatively small area, this is not a problem. But in a map which covers the whole world, the scale values in different area differ drastically. The reason the scalebar shows very small values in the map is because it's under the south pole. So it uses the scale value in south pole area to create the scalebar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But for sure, we can improve the behavior. Issue 1 will be fixed at the next release. Issue 2 will be fixed as well. It will find a more appropriate scale value when the map covers the whole world.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Nov 2010 17:20:39 GMT</pubDate>
    <dc:creator>JianHuang</dc:creator>
    <dc:date>2010-11-10T17:20:39Z</dc:date>
    <item>
      <title>esri.dijit.Scalebar : Issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-dijit-scalebar-issues/m-p/521315#M48584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've just plugged in the scalebar dijit and it doesn't really work...at least not at all extents.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sometimes it displays NaNmi sometimes it shows that the world is only about 120mi around the equator!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/EN/webapi/javascript/arcgis/demos/map/map_scalebar.html"&gt;sample&lt;/A&gt;&lt;SPAN&gt; to see what I mean.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Move the slider all the way to the bottom i.e. zoom right out and you should see the NaN issue, try zooming in a little from that position and you will find it is indeed, a 'small world'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem I have is that at my initial extent (-180,-90,180,90) I get the NaN error when I instantiate the dijit which is throwing an exception in IE such that the dijit doesn't work at all.&amp;nbsp; FF is more forgiving in that despite the initial error (and subsequent display of NaNmi) the dijit does work at 'compatible' extents should the user zoom to them.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 10:04:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-dijit-scalebar-issues/m-p/521315#M48584</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2010-11-04T10:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: esri.dijit.Scalebar : Issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-dijit-scalebar-issues/m-p/521316#M48585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's what worked for me.&amp;nbsp; Initialize the scalebar after your map has loaded, then after the scalebar is initialized, call map.refresh().&amp;nbsp; Without this, my scalebar was incorrect until I did a zoom.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //add the scalebar 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var scalebar = new esri.dijit.Scalebar({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map: map,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scalebarUnit:'english'
&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; //add the overview map 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var overviewMapDijit = new esri.dijit.OverviewMap({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map: map,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; color:"#D84E13",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; opacity:.40,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visible:false,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id:"overviewMap"
&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;nbsp;&amp;nbsp;&amp;nbsp; overviewMapDijit.startup();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.reposition();
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.resize();&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:44:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-dijit-scalebar-issues/m-p/521316#M48585</guid>
      <dc:creator>MichaelJenkins</dc:creator>
      <dc:date>2021-12-11T22:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: esri.dijit.Scalebar : Issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-dijit-scalebar-issues/m-p/521317#M48586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm"&gt;Map class&lt;/A&gt;&lt;SPAN&gt; doesn't have a refresh method but I'll have a play around with sticking a few resize/reposition calls in and see what happens.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are two issues here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; Under certain conditions the initialisation of the scalebar widget fails, so far I have determined that it always fails if the initial map extent is -180,-90,180,90 (wkid:4326) which is pretty poor.&amp;nbsp; Incidentally it seems happy with -179.999,-89.999,179.999,89.999!!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; At some extents the values shown are nonsense.&amp;nbsp; (see attachment - screenshot taken &lt;/SPAN&gt;&lt;STRONG&gt;after&lt;/STRONG&gt;&lt;SPAN&gt; panning/zooming!)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will continue to look into it, but I have to say I'm disappointed...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Nov 2010 08:51:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-dijit-scalebar-issues/m-p/521317#M48586</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2010-11-10T08:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: esri.dijit.Scalebar : Issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-dijit-scalebar-issues/m-p/521318#M48587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the feedback.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When zooming out to the extent covering the whole world under web mercator projection or GCS, there is no meaningful scale value. I attach a screenshot of google maps, which behaves similarly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The reason behind the scenes is those projections distort the map, hence the scale value varies in different area. So there is not a single scale value which can represent the whole map. The implementation of the scalebar picks the scale value at the location of itself to represent the map. In a relatively small area, this is not a problem. But in a map which covers the whole world, the scale values in different area differ drastically. The reason the scalebar shows very small values in the map is because it's under the south pole. So it uses the scale value in south pole area to create the scalebar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But for sure, we can improve the behavior. Issue 1 will be fixed at the next release. Issue 2 will be fixed as well. It will find a more appropriate scale value when the map covers the whole world.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Nov 2010 17:20:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-dijit-scalebar-issues/m-p/521318#M48587</guid>
      <dc:creator>JianHuang</dc:creator>
      <dc:date>2010-11-10T17:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: esri.dijit.Scalebar : Issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-dijit-scalebar-issues/m-p/521319#M48588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks for the feedback.&lt;BR /&gt;When zooming out to the extent covering the whole world under web mercator projection or GCS, there is no meaningful scale value. I attach a screenshot of google maps, which behaves similarly.&lt;BR /&gt;The reason behind the scenes is those projections distort the map, hence the scale value varies in different area. So there is not a single scale value which can represent the whole map. The implementation of the scalebar picks the scale value at the location of itself to represent the map. In a relatively small area, this is not a problem. But in a map which covers the whole world, the scale values in different area differ drastically. The reason the scalebar shows very small values in the map is because it's under the south pole. So it uses the scale value in south pole area to create the scalebar.&lt;BR /&gt;But for sure, we can improve the behavior. Issue 1 will be fixed at the next release. Issue 2 will be fixed as well. It will find a more appropriate scale value when the map covers the whole world.&lt;BR /&gt;Thanks again.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand the problems in making an accurate scalebar and that the accuracy is inversely proportional to the size of the extent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interesting info, I would have thought the middle latitude would have been a better choice, since most users will have the area of interest in the middle of their current extent.&amp;nbsp; By choosing the extreme southerly latitude it makes the scalebar (even more) inaccurate for the probable area of interest.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Presumably the most southerly latitude is still used when using the scalebar in an external container, like in this &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/EN/webapi/javascript/arcgis/demos/map/map_scalebarExt.html"&gt;sample&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 13:49:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-dijit-scalebar-issues/m-p/521319#M48588</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2010-11-12T13:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: esri.dijit.Scalebar : Issues</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-dijit-scalebar-issues/m-p/521320#M48589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are correct, in the sample you like the southerly postion is used. The Scalebar widget help topic provides a few details about the location used to calculate the scale when placed externally.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/scalebar.htm"&gt;http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/scalebar.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;Presumably the most southerly latitude is still used when using the scalebar in an external container, like in this &lt;A href="http://help.arcgis.com/EN/webapi/javascript/arcgis/demos/map/map_scalebarExt.html"&gt;sample&lt;/A&gt;.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 18:19:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/esri-dijit-scalebar-issues/m-p/521320#M48589</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2010-11-12T18:19:48Z</dc:date>
    </item>
  </channel>
</rss>

