<?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 do I create a layer that is generated from an image? in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686928#M6119</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great! Glad to know that everything is working for you now! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nimesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Jun 2012 14:24:18 GMT</pubDate>
    <dc:creator>NimeshJarecha</dc:creator>
    <dc:date>2012-06-21T14:24:18Z</dc:date>
    <item>
      <title>How do I create a layer that is generated from an image?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686919#M6110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to add an overlay image to the map in iOS. The iOS MapKit allows me to specify an overlay image to use on top of the map and that's what version 1.0 of my app did. I've changed to use the ArcGIS maps and I want to add the same type of overlay. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm able to create the AGSMapView and add it to my view and everything works fine. I'm able to add a graphics layer and add some symbols with callouts just fine too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the image retrieved from the server and I know the envelope of the affected area where I want to overlay the image. I'm just not sure how to add a given image to the map. I've tried:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Create a custom tiled layer - but after reading a blog post on esri it seemed to indicate that images should use the dynamic layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Create a custom dynamic layer - I subclassed AGSDynamicLayer. My subclass returns the right envelope, spatial reference, units and initial envelope. I'm also defining exportMapImage but I don't know what should go in that method. I'm creating a subclass of NSOperation which implements AGSDynamicLayerDrawingOperation but it doesn't seem to do anything. I'm also calling [self.exportDelegate dynamicLayer:self exportMapImageOperation:operation didFinishWithImage:self.mapImage]; in exportMapImage. I can see my method get called and the image and parameters seem good. But no image shows on the map (I've added my custom dynamic layer to the AGSMapView).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Create a new graphic layer - I created a graphics layer and added my image to it using AGSGraphic graphicWithGeometry:graphicRect symbol:graphicSymbol attributes:graphicAttributes infoTemplateDelegate:self]; where the graphicRect is bounds of my image envelope and the graphicSymbol is [AGSPictureMarkerSymbol pictureMarkerSymbolWithImage:mapImage]; - This does put my image on the map, but it's not scaling correctly when I zoom or move the map. I want it to remain in the specified rectangle even when the map is moved or zoomed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure what direction I should take, I feel like I'm not going about this the right way. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's an example of what I want to do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - go to &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://raidsonline.com/" rel="nofollow" target="_blank"&gt;http://raidsonline.com/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt; - on the left, pick AZ - Avondale from the Jump To City dropdown&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - on the left, check the box in front of density map under the Analytic Layers section. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - the image the shows up on the map is the image I'm retrieving from the server and want to add on top of the map on the iPhone/iPad&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 06:56:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686919#M6110</guid>
      <dc:creator>BillNalen</dc:creator>
      <dc:date>2012-06-19T06:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a layer that is generated from an image?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686920#M6111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You should publish your data as either Map Service or Image Service and use AGSDynamicMapServiceLayer or AGSImageServiceLayer from the SDK and it'll work exactly as you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nimesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 16:48:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686920#M6111</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2012-06-19T16:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a layer that is generated from an image?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686921#M6112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't have access to the server code so I have to use what I'm given, just an image and the envelope for the image. Is there a way to subclass one of those classes and just have it draw the image that I give it?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 17:16:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686921#M6112</guid>
      <dc:creator>BillNalen</dc:creator>
      <dc:date>2012-06-19T17:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a layer that is generated from an image?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686922#M6113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you please share your custom dynamic layer code so I can have a look, why it's not working?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nimesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2012 19:52:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686922#M6113</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2012-06-20T19:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a layer that is generated from an image?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686923#M6114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In my subclass init method I do this, where heatArea is the visible area of the map translated to WKID 4326 (which I pass to the server to retrieve the image) (my base map is in WKID 102100)&lt;/SPAN&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;&amp;nbsp; AGSSpatialReference *baseSR = [AGSSpatialReference spatialReferenceWithWKID:102100];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGeometryEngine *geometryEngine = [AGSGeometryEngine defaultGeometryEngine];&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPoint *min = [[AGSPoint alloc] initWithX:heatArea.envelope.xmin y:heatArea.envelope.ymin spatialReference:heatArea.envelope.spatialReference];&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; AGSPoint *adjustedMin = (AGSPoint*) [geometryEngine projectGeometry:min toSpatialReference:baseSR];&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; AGSPoint *max = [[AGSPoint alloc] initWithX:heatArea.envelope.xmax y:heatArea.envelope.ymax spatialReference:heatArea.envelope.spatialReference];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPoint *adjustedMax = (AGSPoint*) [geometryEngine projectGeometry:max toSpatialReference:baseSR];&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; densityFullEnvelope = [AGSEnvelope envelopeWithXmin:adjustedMin.x 
&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;&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;&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; ymin:adjustedMin.y 
&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;&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;&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; xmax:adjustedMax.x 
&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;&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;&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; ymax:adjustedMax.y 
&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; spatialReference:baseSR];

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I then override these methods (though only the first one ever seems to be called):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
- (NSOperation&amp;lt;AGSDynamicLayerDrawingOperation&amp;gt;*)exportMapImage:(AGSExportImageParams*)params
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; DensityMapOperation *operation = [[DensityMapOperation alloc] initWithParams:params];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.exportDelegate dynamicLayer:self exportMapImageOperation:operation didFinishWithImage:self.mapImage];
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; return operation;
}
- (AGSUnits)units
{
 return densityUnits;
}

- (AGSSpatialReference *)spatialReference
{
 return densityFullEnvelope.spatialReference;
}

- (AGSEnvelope *)fullEnvelope
{
 return densityFullEnvelope;
}

- (AGSEnvelope *)initialEnvelope
{
 //Assuming our initial extent is the same as the full extent
 return densityFullEnvelope;
}

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I didn't find anything in the documentation about what to override in my subclass of NSOperation &amp;lt;AGSDynamicLayerDrawingOperation&amp;gt; so I just overrode the following which are the parameters originally passed in when the object was created:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
- (AGSExportImageParams *)exportImageParams
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; return theParams; 
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems like the following line is the only thing that has an image in it:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
[self.exportDelegate dynamicLayer:self exportMapImageOperation:operation didFinishWithImage:self.mapImage];
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But why would I pass the image and the operation to the delegate? That seems a little confusing. I was expecting to pass the image to some view that would then use it and draw it on the screen. Finally, I'm adding the layer like this:&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; DensityMapLayer *densityMapLayer = [[DensityMapLayer alloc] initWithGeometry:heatArea];&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; densityMapLayer.mapImage = [heatServer.mapImage copy];
&amp;nbsp;&amp;nbsp;&amp;nbsp; UIView *densityView = [self.mapView addMapLayer:densityMapLayer withName:@"Density Layer"];
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nothing shows on the map even though the image is good (I can throw the image in a UIImageView and it shows properly). I also can't find where the operation created in the method above gets used. It doesn't seem to run or anything, just one property seems to get hit. I was hoping to see something like MapImageLayer from the Javascript library where I could just pass the layer an image and add it to the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hopefully I'm missing something here. I did look through a ton of documentation and the header files, but I didn't see any other methods on AGSDynamicLayer or NSOperation &amp;lt;AGSDynamicLayerDrawingOperation&amp;gt; that would help me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for any help you can give.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:53:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686923#M6114</guid>
      <dc:creator>BillNalen</dc:creator>
      <dc:date>2021-12-12T04:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a layer that is generated from an image?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686924#M6115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okie..i just wrote a custom dynamic layer for you...see it attached and you'll get to know what to do. You should add layer like below...however, i'm not sure how to get the correct image id, you know that. Also, you can pass your envelope which you are creating.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustomDynamicLayer *customDynamicLayer = [[CustomDynamicLayer alloc] initWithURL:[NSURL URLWithString:@"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://raidsonline.com/ImageService" rel="nofollow" target="_blank"&gt;http://raidsonline.com/ImageService&lt;/A&gt;&lt;SPAN&gt;"] imageId:@"9b82ece8-ef75-4002-bcdd-a66b87b49852" envelope:&amp;lt;&amp;gt;];&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.mapView addMapLayer:customDynamicLayer withName:@"Custom Dynamic Layer"];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The layer will request the image with given id.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nimesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2012 21:25:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686924#M6115</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2012-06-20T21:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a layer that is generated from an image?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686925#M6116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Wow, that was great. I don't know how it's assembling the final url to get the image, but apparently it's just tacking on the id using the dictionary passed. So this class (AGSDynamicLayerImageRequestOperation) must be doing the fetching for me based on the dictionary and url passed. I never thought to let the API fetch the image for me, thought I had to do that and then use it. I now get the right image back and it shows on the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, it's still not quite right. It doesn't seem to be doing anything with the envelope and just draws the image over the current visible area. If I zoom or pan the map, the dynamic layer seems to just stay unzoomed and unpanned. That is, the underlying map is zooming and moving but my image remains unchanged from when it's first drawn.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I fetch the image I'm using the following for the envelope:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
heatArea = self.mapView.visibleArea;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I breakpoint on units, spatialReference, fullEnvelope, or initialEnvelope, I don't see them getting called at all. Is this right? Seems like the layer isn't getting the right envelope picked up somewhere.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for all the help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bill&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:53:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686925#M6116</guid>
      <dc:creator>BillNalen</dc:creator>
      <dc:date>2021-12-12T04:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a layer that is generated from an image?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686926#M6117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oh I think I see. It's getting passed the exportImageParams with a new envelope and that envelope is probably the current visible area. But I'm returning the same image for each call since I haven't changed my image id yet. This would work if I fetched a new image each time the map moves. But I only fetch a new image when I hit a button rather than when the map moves. I think I can fix what you sent to only get a new image.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2012 23:47:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686926#M6117</guid>
      <dc:creator>BillNalen</dc:creator>
      <dc:date>2012-06-20T23:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a layer that is generated from an image?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686927#M6118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay, got it. I just return early from exportMapImage if I've already loaded the image for this envelope. When I request the next image I just delete the dynamic layer and then create a new one. Working perfectly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks so much for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bill&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 00:00:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686927#M6118</guid>
      <dc:creator>BillNalen</dc:creator>
      <dc:date>2012-06-21T00:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a layer that is generated from an image?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686928#M6119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great! Glad to know that everything is working for you now! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nimesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 14:24:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686928#M6119</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2012-06-21T14:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a layer that is generated from an image?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686929#M6120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Great! Glad to know that everything is working for you now! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Nimesh&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, Nimesh and Bill&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have read this thread. And I think I encounter a similar problem: I also retrieve an image from server,and the server also returns an envelope of the image. Now I have to add this image to the map layer within the right envelope, and let the image scaled correctly when the map zoomed in or out, just keep the image in the constant envelope.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also download the attachment you provided to resolve Bill's problem. However, I found that there are not these methods in AGSDynamicLayer of the latest iOS SDK. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, - (NSOperation&amp;lt;AGSDynamicLayerDrawingOperation&amp;gt;*)exportMapImage:(AGSExportImageParams*)params {...}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and now I find &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- (void) requestImageWithWidth:(NSInteger) width height:(NSInteger) height envelope:(AGSEnvelope *) env timeExtent:(AGSTimeExtent *) timeExtent{...} instead.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How should I do now? I have been troubled with this problem for a long time, and can't find any solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Would you please help me? Thanks for any help you can give!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Somnus Lee&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Dec 2013 06:41:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686929#M6120</guid>
      <dc:creator>SomnusLee</dc:creator>
      <dc:date>2013-12-30T06:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a layer that is generated from an image?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686930#M6121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The custom dynamic layer sample is available on &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://github.com/Esri/tips-and-tricks-ios/tree/master/UC2013_TipsAndTricksDemos/CustomDynamicLayer" rel="nofollow" target="_blank"&gt;github&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You should use &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/en/ios/api-reference/interface_a_g_s_image_request_operation.html" rel="nofollow" target="_blank"&gt;AGSImageRequestOperation&lt;/A&gt;&lt;SPAN&gt; to request an image from requestImageWithWidth method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nimesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Dec 2013 15:34:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686930#M6121</guid>
      <dc:creator>NimeshJarecha</dc:creator>
      <dc:date>2013-12-30T15:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a layer that is generated from an image?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686931#M6122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The custom dynamic layer sample is available on &lt;A href="https://github.com/Esri/tips-and-tricks-ios/tree/master/UC2013_TipsAndTricksDemos/CustomDynamicLayer"&gt;github&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;You should use &lt;A href="https://developers.arcgis.com/en/ios/api-reference/interface_a_g_s_image_request_operation.html"&gt;AGSImageRequestOperation&lt;/A&gt; to request an image from requestImageWithWidth method.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Nimesh&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Wow, great! Thanks very much for your new year gift! Happy New Year To You!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jan 2014 01:46:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-do-i-create-a-layer-that-is-generated-from-an/m-p/686931#M6122</guid>
      <dc:creator>SomnusLee</dc:creator>
      <dc:date>2014-01-01T01:46:53Z</dc:date>
    </item>
  </channel>
</rss>

