<?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 Min Max extent not working?? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/min-max-extent-not-working/m-p/1089895#M74318</link>
    <description>&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;I am using the ESRI JS API 4.2&lt;/P&gt;&lt;P&gt;I am trying to use BNG grid coordinates for the Min/Max extent, and centre.&lt;/P&gt;&lt;P&gt;The map defaults to the world view, not UK extent?? I cannot see why it is not working??&lt;/P&gt;&lt;P&gt;This is the JS script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        const view = new MapView({
          container: "viewDiv",
          map: map,
		      center: [506032.00000, 194447.000000],
		      //zoom: 15,
		      scale: 50000,
		  
          extent: {
            // autocasts as new Extent()
            xmin: 53976.3289500004,          // 318351.6994,
            ymin: 633750.0000,            // -5.6914500001,
            xmax: -168200.0000,             // 571833.3974,
            ymax: 117983.0000,          // 657535.9723, 
            spatialReference: 27700
          }
        });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added the following that was listed as a solution in another posting... Still doesn't work??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        view.when(() =&amp;gt; {
          //view.goTo(layer.fullExtent);
          // this works too	
          view.extent = layer.fullExtent;
        });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Map extent" style="width: 824px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/21053i4346DC2042E65205/image-size/large?v=v2&amp;amp;px=999" role="button" title="map-1.PNG" alt="Map extent" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Map extent&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using BNG (27700), not WGS84. So I don't see why the centre, extent and zoom is not honoured?? I would appreciate any pointers.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Clive&lt;/P&gt;</description>
    <pubDate>Wed, 18 Aug 2021 11:34:34 GMT</pubDate>
    <dc:creator>CliveSwan</dc:creator>
    <dc:date>2021-08-18T11:34:34Z</dc:date>
    <item>
      <title>Min Max extent not working??</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/min-max-extent-not-working/m-p/1089895#M74318</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;I am using the ESRI JS API 4.2&lt;/P&gt;&lt;P&gt;I am trying to use BNG grid coordinates for the Min/Max extent, and centre.&lt;/P&gt;&lt;P&gt;The map defaults to the world view, not UK extent?? I cannot see why it is not working??&lt;/P&gt;&lt;P&gt;This is the JS script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        const view = new MapView({
          container: "viewDiv",
          map: map,
		      center: [506032.00000, 194447.000000],
		      //zoom: 15,
		      scale: 50000,
		  
          extent: {
            // autocasts as new Extent()
            xmin: 53976.3289500004,          // 318351.6994,
            ymin: 633750.0000,            // -5.6914500001,
            xmax: -168200.0000,             // 571833.3974,
            ymax: 117983.0000,          // 657535.9723, 
            spatialReference: 27700
          }
        });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added the following that was listed as a solution in another posting... Still doesn't work??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        view.when(() =&amp;gt; {
          //view.goTo(layer.fullExtent);
          // this works too	
          view.extent = layer.fullExtent;
        });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Map extent" style="width: 824px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/21053i4346DC2042E65205/image-size/large?v=v2&amp;amp;px=999" role="button" title="map-1.PNG" alt="Map extent" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Map extent&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using BNG (27700), not WGS84. So I don't see why the centre, extent and zoom is not honoured?? I would appreciate any pointers.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Clive&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 11:34:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/min-max-extent-not-working/m-p/1089895#M74318</guid>
      <dc:creator>CliveSwan</dc:creator>
      <dc:date>2021-08-18T11:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Min Max extent not working??</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/min-max-extent-not-working/m-p/1089956#M74319</link>
      <description>&lt;P&gt;You can set the spatialReference on the MapView&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#spatialReference" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#spatialReference&lt;/A&gt;&amp;nbsp;but your basemap also needs to match. The default esri basemaps are all web mercator and can't be reprojected.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 14:52:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/min-max-extent-not-working/m-p/1089956#M74319</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-08-18T14:52:56Z</dc:date>
    </item>
  </channel>
</rss>

