Is there a getSamples equivalent on a AGSRasterLayer for the iOS SDK?

503
4
11-11-2022 12:06 AM
frankm
by
New Contributor III

Hi,

I need to duplicate some functionality from a javascript project we have using the getSamples method on a imagerylayer in iOS and I have been unable to locate a similar operation on the AGSRasterLayer. Is this supported at all, maybe a different path that isn't so clear?

0 Kudos
4 Replies
MarkDostal
Esri Contributor

Hello, and thank you for your question!  The "getSamples" method is not supported, but "Identify" is.  "Identify" is similar to "getSamples", but not quite the same.  Here's a snippet of the doc from "AGSRasterLayer":  

Each raster layer supports identify on its individual cells when it is displayed in an @c AGSMapView or @c AGSSceneView.

You can use one of the "Identify" methods on the "AGSGeoView".

Let us know if you have more questions.

Mark

0 Kudos
MarkDostal
Esri Contributor

Hey, there's one other thing you can do, if "Identify" doesn't meet your needs.  You can use the "AGSJSONRequestOperation" class to make the REST API request for "getSampes" yourself.  The REST API for that is here.  The class doc is here.

Hope that helps,

Mark

0 Kudos
frankm
by
New Contributor III

Aha! I have actually started to implement the getSamples using the REST API but I will explore the identify later, just made some codable structs and it would be a shame to not try it out 🙂

0 Kudos
MarkDostal
Esri Contributor

Ha ha ha, yea codable structs are pretty cool.  If you need any more help or have questions, feel free to reach out!

Mark

0 Kudos