<?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 SpatialReference is changed when exporting tilecache with parameters in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/spatialreference-is-changed-when-exporting/m-p/304095#M2712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to everyone, and thanks in advance for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an strange problem using v.10.2.5 of ArcGis-RunTIme-SDK-iOS. After reading the guides i've been able to export tile cache of one agstiledlayer using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;//temp is an NSMutableArray containing NSNumbers... something like {@"1",@"2",@"3"...}&lt;/P&gt;&lt;P class="p1"&gt;//self.geom is an instance of AGSEnvelope with WKID = 25830 and xmin,ymin,xmax and ymax initialized to the values of the envelope i want to cache.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;params&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; = [[&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;AGSExportTileCacheParams&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;alloc&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;] &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;initWithLevelsOfDetail&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;:temp &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;areaOfInterest&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;:&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;self&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;.&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;geom&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;];&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="s3"&gt;[task&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;exportTileCacheWithParameters&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;:&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;params&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;downloadFolderPath&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;:exportedPath &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;useExisting&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;:NO&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;status&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;:^(&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;AGSResumableTaskJobStatus&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; status, &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;NSDictionary&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; *userInfo) {&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //UPDATE STATUS OF DOWNLOADED PERCENTAGE...&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="s3"&gt;} &lt;/SPAN&gt;&lt;SPAN class="s7"&gt;completion&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;:^(&lt;/SPAN&gt;&lt;SPAN class="s7"&gt;AGSLocalTiledLayer&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; *localTiledLayer, &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;NSError&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; *error) {&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //localTiledLayer spatialReference WKID is 102100&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;STRONG&gt;&lt;SPAN class="s3"&gt;}];&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;STRONG&gt;&lt;SPAN class="s3"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;The problem i have is that the localTiledLayer downloaded has a different spatialreference (102100) than the parameters i used to specify the download (25830). Why is this happening? Am i doing something wrong or is something not related with the client (iOS) side?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;Thanks for your help,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Apr 2016 11:09:45 GMT</pubDate>
    <dc:creator>LucianoRodríguez</dc:creator>
    <dc:date>2016-04-07T11:09:45Z</dc:date>
    <item>
      <title>SpatialReference is changed when exporting tilecache with parameters</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/spatialreference-is-changed-when-exporting/m-p/304095#M2712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to everyone, and thanks in advance for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an strange problem using v.10.2.5 of ArcGis-RunTIme-SDK-iOS. After reading the guides i've been able to export tile cache of one agstiledlayer using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;//temp is an NSMutableArray containing NSNumbers... something like {@"1",@"2",@"3"...}&lt;/P&gt;&lt;P class="p1"&gt;//self.geom is an instance of AGSEnvelope with WKID = 25830 and xmin,ymin,xmax and ymax initialized to the values of the envelope i want to cache.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;params&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; = [[&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;AGSExportTileCacheParams&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;alloc&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;] &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;initWithLevelsOfDetail&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;:temp &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;areaOfInterest&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;:&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;self&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;.&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;geom&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;];&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="s3"&gt;[task&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;exportTileCacheWithParameters&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;:&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;params&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;downloadFolderPath&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;:exportedPath &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;useExisting&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;:NO&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;status&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;:^(&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;AGSResumableTaskJobStatus&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; status, &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;NSDictionary&lt;/SPAN&gt;&lt;SPAN class="s2"&gt; *userInfo) {&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //UPDATE STATUS OF DOWNLOADED PERCENTAGE...&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="s3"&gt;} &lt;/SPAN&gt;&lt;SPAN class="s7"&gt;completion&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;:^(&lt;/SPAN&gt;&lt;SPAN class="s7"&gt;AGSLocalTiledLayer&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; *localTiledLayer, &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;NSError&lt;/SPAN&gt;&lt;SPAN class="s3"&gt; *error) {&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //localTiledLayer spatialReference WKID is 102100&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;STRONG&gt;&lt;SPAN class="s3"&gt;}];&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;STRONG&gt;&lt;SPAN class="s3"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;The problem i have is that the localTiledLayer downloaded has a different spatialreference (102100) than the parameters i used to specify the download (25830). Why is this happening? Am i doing something wrong or is something not related with the client (iOS) side?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;Thanks for your help,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 11:09:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/spatialreference-is-changed-when-exporting/m-p/304095#M2712</guid>
      <dc:creator>LucianoRodríguez</dc:creator>
      <dc:date>2016-04-07T11:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: SpatialReference is changed when exporting tilecache with parameters</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/spatialreference-is-changed-when-exporting/m-p/304096#M2713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luciano,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot overwrite/change the default spatial reference when you execute an export tile cache. The reason is because all tiling schemes are associated with a certain spatial reference. Your data frame/dataset/layer's spatial reference must match the spatial reference of your tiling scheme in order for tiles to be created. Think tile cached as a image, that you cannot distort those predefined image into another spatial reference. For more information, you can read this online documentation:&lt;/P&gt;&lt;P&gt;&lt;A href="http://server.arcgis.com/en/server/10.3/publish-services/linux/what-is-map-caching-.htm" title="http://server.arcgis.com/en/server/10.3/publish-services/linux/what-is-map-caching-.htm"&gt;What is map caching?—Documentation (10.3 and 10.3.1) | ArcGIS for Server&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Normally, when we download the cache tile in Runtime iOS, we will define the AGSEnvelope to current mapView extent:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px;"&gt;AGSEnvelope *extent = [&lt;/SPAN&gt;&lt;SPAN class="pl-v" style="color: #ed6a43; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px;"&gt;self&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px;"&gt;.mapView &lt;/SPAN&gt;&lt;SPAN class="pl-c1" style="color: #0086b3; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px;"&gt;visibleAreaEnvelope&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to download a tile cache in 25830, you must find a tile cache service that has same spatial reference 25830. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hope this can help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 21:58:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/spatialreference-is-changed-when-exporting/m-p/304096#M2713</guid>
      <dc:creator>YueWu1</dc:creator>
      <dc:date>2016-04-07T21:58:51Z</dc:date>
    </item>
  </channel>
</rss>

