<?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: How to get map extent in ArcGIS AppStudio Questions</title>
    <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-get-map-extent/m-p/802487#M1347</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nakul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yeah I think you're on the money re the order of loading. I load the tpk first, then the online layer. So I could dynamically load the online layer first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hypothetically, if the user had no network connection when they started the app, and maybe I dynamically then load just the tpk. Then, then magically get network connection and I want to add the online basemap. I take it there would be no way to reset that extent without destroying and creating a new 'Map' object, is that correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regardless of that, I still wonder whether there should be an extent property of the Map itself, as it obviously has one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Apr 2018 21:20:25 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2018-04-12T21:20:25Z</dc:date>
    <item>
      <title>How to get map extent</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-get-map-extent/m-p/802485#M1345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using the Runtime v100.x, how can you get the full extent of the map?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the previous runtime, the 'Map' type had properties called 'extent' and 'fullExtent' which from memory gave&amp;nbsp;Envelope objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the new runtime, the MapView has a visibleArea which obviously changes as you pan around the map. It also has a currentViewpointExtent, which I guess kind of does the same thing.&lt;/P&gt;&lt;P&gt;The Map has layers, but no extent property.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I create the Map object, I'm using a local tpk as the basemap, which has a small defined extent. After it loads, if the user has a network connection, I then add an online basemap under it for a bit of context. At this point, the user can pan to the edge of the tpk and no further. What I want to do now is detect if the current gps location is within this map extent, i.e. the extent of the tpk. So I need the map extent as a polygon object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The basemap object of the Map doesn't even have an extent property.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it seems that I'm forced to reach into the baseLayers object of the basemap and pull out the individual tpk layer, as a 'Layer' type *does* have a fullExtent property.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could do this since I know which is the particular layer. But it seems like the MapView is already constrained to a certain extent and I should be able to just access that as a property of the view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bonus points if someone could say how to override the extent of the Map/MapView, in other words,&amp;nbsp;if the online basemap does manage to load, how can I make it so the user can pan the full extent of that layer?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2018 12:23:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-get-map-extent/m-p/802485#M1345</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-04-12T12:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to get map extent</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-get-map-extent/m-p/802486#M1346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the fullextent property is only available on the Layer level. I would like to know how are you adding the tpk and the online basemap? Are you adding them as a part of basemap object or adding separately as layers. Because somethings get defined based on the first layer you load.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words can you try loading the online basemap first and then load the tpk on top of that and see if you can pan outside the tpk?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nakul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2018 18:08:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-get-map-extent/m-p/802486#M1346</guid>
      <dc:creator>nakulmanocha</dc:creator>
      <dc:date>2018-04-12T18:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to get map extent</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-get-map-extent/m-p/802487#M1347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nakul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yeah I think you're on the money re the order of loading. I load the tpk first, then the online layer. So I could dynamically load the online layer first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hypothetically, if the user had no network connection when they started the app, and maybe I dynamically then load just the tpk. Then, then magically get network connection and I want to add the online basemap. I take it there would be no way to reset that extent without destroying and creating a new 'Map' object, is that correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regardless of that, I still wonder whether there should be an extent property of the Map itself, as it obviously has one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2018 21:20:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-get-map-extent/m-p/802487#M1347</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-04-12T21:20:25Z</dc:date>
    </item>
  </channel>
</rss>

