<?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 Bing Geocoder State of Alaska in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-geocoder-state-of-alaska/m-p/387857#M35795</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I working on an application that uses the Bing Geocoder to return the best extent for a state and zoom to that location.&amp;nbsp; I'm finding an issue with the state of Alaska.&amp;nbsp; All of the other states return the correct spatial extent in the 'bestView' property.&amp;nbsp; Here is the code I have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;veGeocoder3.addressToLocations(where);//*** 'where' = 'AK' or 'Alaska'

function(geocodeResults) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 if(geocodeResults.length == 0){
&amp;nbsp; alert("No address results returned.");
 }else if(searchType == 'Address' &amp;amp;&amp;amp; radius != ''){
&amp;nbsp; var location = geocodeResults[0].location;
&amp;nbsp; var pointMeters = esri.geometry.geographicToWebMercator(location);
&amp;nbsp;&amp;nbsp;&amp;nbsp; var pointSymbol = new esri.symbol.SimpleMarkerSymbol().setSize(10).setColor(new dojo.Color("black"));
&amp;nbsp;&amp;nbsp;&amp;nbsp; var locationGraphic = new esri.Graphic(pointMeters,pointSymbol);
&amp;nbsp; var level = radiuszoom[radius];
&amp;nbsp; addResults.add(locationGraphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp; var buffDist = radius;
&amp;nbsp;&amp;nbsp;&amp;nbsp; doBuffer(buffDist,pointMeters);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.centerAndZoom(pointMeters,level);
 }else{
&amp;nbsp; map.setExtent(esri.geometry.geographicToWebMercator(geocodeResults[0].bestView));
 }
 
 });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the extent of the returned information I see the xmin value is missing a negative.&amp;nbsp; Has anyone experienced this same situation?&amp;nbsp; Any suggestions on a solution?&amp;nbsp; I would still like to stick with the Bing Geocoder instead of publishing a state layer for searching.&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Apr 2012 15:55:34 GMT</pubDate>
    <dc:creator>JesseAdams</dc:creator>
    <dc:date>2012-04-12T15:55:34Z</dc:date>
    <item>
      <title>Bing Geocoder State of Alaska</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-geocoder-state-of-alaska/m-p/387857#M35795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I working on an application that uses the Bing Geocoder to return the best extent for a state and zoom to that location.&amp;nbsp; I'm finding an issue with the state of Alaska.&amp;nbsp; All of the other states return the correct spatial extent in the 'bestView' property.&amp;nbsp; Here is the code I have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;veGeocoder3.addressToLocations(where);//*** 'where' = 'AK' or 'Alaska'

function(geocodeResults) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 if(geocodeResults.length == 0){
&amp;nbsp; alert("No address results returned.");
 }else if(searchType == 'Address' &amp;amp;&amp;amp; radius != ''){
&amp;nbsp; var location = geocodeResults[0].location;
&amp;nbsp; var pointMeters = esri.geometry.geographicToWebMercator(location);
&amp;nbsp;&amp;nbsp;&amp;nbsp; var pointSymbol = new esri.symbol.SimpleMarkerSymbol().setSize(10).setColor(new dojo.Color("black"));
&amp;nbsp;&amp;nbsp;&amp;nbsp; var locationGraphic = new esri.Graphic(pointMeters,pointSymbol);
&amp;nbsp; var level = radiuszoom[radius];
&amp;nbsp; addResults.add(locationGraphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp; var buffDist = radius;
&amp;nbsp;&amp;nbsp;&amp;nbsp; doBuffer(buffDist,pointMeters);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.centerAndZoom(pointMeters,level);
 }else{
&amp;nbsp; map.setExtent(esri.geometry.geographicToWebMercator(geocodeResults[0].bestView));
 }
 
 });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the extent of the returned information I see the xmin value is missing a negative.&amp;nbsp; Has anyone experienced this same situation?&amp;nbsp; Any suggestions on a solution?&amp;nbsp; I would still like to stick with the Bing Geocoder instead of publishing a state layer for searching.&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2012 15:55:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-geocoder-state-of-alaska/m-p/387857#M35795</guid>
      <dc:creator>JesseAdams</dc:creator>
      <dc:date>2012-04-12T15:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Bing Geocoder State of Alaska</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-geocoder-state-of-alaska/m-p/387858#M35796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you include the aleutian islands, Alaska crosses the international dateline, so 170 is most likely correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I working on an application that uses the Bing Geocoder to return the best extent for a state and zoom to that location.&amp;nbsp; I'm finding an issue with the state of Alaska.&amp;nbsp; All of the other states return the correct spatial extent in the 'bestView' property.&amp;nbsp; Here is the code I have:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;veGeocoder3.addressToLocations(where);//*** 'where' = 'AK' or 'Alaska'

function(geocodeResults) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 if(geocodeResults.length == 0){
&amp;nbsp; alert("No address results returned.");
 }else if(searchType == 'Address' &amp;amp;&amp;amp; radius != ''){
&amp;nbsp; var location = geocodeResults[0].location;
&amp;nbsp; var pointMeters = esri.geometry.geographicToWebMercator(location);
&amp;nbsp;&amp;nbsp;&amp;nbsp; var pointSymbol = new esri.symbol.SimpleMarkerSymbol().setSize(10).setColor(new dojo.Color("black"));
&amp;nbsp;&amp;nbsp;&amp;nbsp; var locationGraphic = new esri.Graphic(pointMeters,pointSymbol);
&amp;nbsp; var level = radiuszoom[radius];
&amp;nbsp; addResults.add(locationGraphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp; var buffDist = radius;
&amp;nbsp;&amp;nbsp;&amp;nbsp; doBuffer(buffDist,pointMeters);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.centerAndZoom(pointMeters,level);
 }else{
&amp;nbsp; map.setExtent(esri.geometry.geographicToWebMercator(geocodeResults[0].bestView));
 }
 
 });&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Looking at the extent of the returned information I see the xmin value is missing a negative.&amp;nbsp; Has anyone experienced this same situation?&amp;nbsp; Any suggestions on a solution?&amp;nbsp; I would still like to stick with the Bing Geocoder instead of publishing a state layer for searching.&amp;nbsp; Thanks!&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:48:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-geocoder-state-of-alaska/m-p/387858#M35796</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2021-12-11T17:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Bing Geocoder State of Alaska</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-geocoder-state-of-alaska/m-p/387859#M35797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That makes sense.&amp;nbsp; I don't remember this being the case a few months back.&amp;nbsp; Why would the "bestview" return values that don't best represent the "bestview" of the spatial feature being requested.&amp;nbsp; I suppose using the the returned location point would be an option?&amp;nbsp; Any other options?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2012 17:33:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-geocoder-state-of-alaska/m-p/387859#M35797</guid>
      <dc:creator>JesseAdams</dc:creator>
      <dc:date>2012-04-12T17:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Bing Geocoder State of Alaska</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-geocoder-state-of-alaska/m-p/387860#M35798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That makes sense.&amp;nbsp; I don't remember this being the case a few months back.&amp;nbsp; Why would the "bestview" return values that don't best represent the "bestview" of the spatial feature being requested.&amp;nbsp; I suppose using the the returned location point would be an option?&amp;nbsp; Any other options?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;no idea, you could try setExtent(...extent.bestview, true) to force the entire extent into the view.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2012 18:19:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-geocoder-state-of-alaska/m-p/387860#M35798</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2012-04-12T18:19:13Z</dc:date>
    </item>
  </channel>
</rss>

