In ArcGIS iOS, can callouts display dynamically changing data?

986
2
Jump to solution
09-01-2018 06:11 PM
MichaelHorii
New Contributor II

I'm developing an app using version 100.2.1 of the ArcGIS iOS SDK. From my testing using simple (non-custom) callouts, it appears that the callout can only display static data while the callout is being shown. Is there a way to have a callout display real-time data that changes while the callout is open, for either non-custom or custom callouts? 

For example, suppose a user taps on a stock symbol, causing a callout to open. The callout displays a stock's current price, and the price changes while the callout is open. It would be great if the user could see the new price and not worry that the information is stale. Can the callout be made to update its display to reflect the changing stock price in this scenario?

0 Kudos
1 Solution

Accepted Solutions
JakeShapley
New Contributor III

Hello Michael,

There are several different ways you could accomplish this. You could do so via the built-in callout's customView (which is essentially just a UIView), or just roll your own view (and optionally view controller). For example, we use a "bottom sheet" UIView which we animate on, up, and down the screen, while dynamically updating data as it changes via notification handler methods in the map view controller (though, we could just as easily have embedded another view controller in a container view, or presented another view controller over the map view controller context).

It is my experience that customers typically end up wanting more and more functionality that tends to push the bounds of basic classes like the AGSCallout. I recommend taking the only slightly greater effort (in the short-run) to create a custom view that gives you exactly what you need.

If you're interested, I'm happy to show you some sample code.

Cheers,

Jake

View solution in original post

0 Kudos
2 Replies
JakeShapley
New Contributor III

Hello Michael,

There are several different ways you could accomplish this. You could do so via the built-in callout's customView (which is essentially just a UIView), or just roll your own view (and optionally view controller). For example, we use a "bottom sheet" UIView which we animate on, up, and down the screen, while dynamically updating data as it changes via notification handler methods in the map view controller (though, we could just as easily have embedded another view controller in a container view, or presented another view controller over the map view controller context).

It is my experience that customers typically end up wanting more and more functionality that tends to push the bounds of basic classes like the AGSCallout. I recommend taking the only slightly greater effort (in the short-run) to create a custom view that gives you exactly what you need.

If you're interested, I'm happy to show you some sample code.

Cheers,

Jake

0 Kudos
MichaelHorii
New Contributor II

Hi Jake,

Thanks for your reply! Yes, if you could send me some sample code, that

would be extremely helpful.

Best regards,

Michael

0 Kudos