Add a View to Callout in Forms

223
4
10-16-2019 10:35 AM
Highlighted
MVP Regular Contributor

Was hoping to setup a popup in a Xamarin forms application and realize there is no way to add any kind of custom view to the callout.  This raises significant issue because if points are really close together there is no way to scroll through the items that could get identified.  In WPF and it would seem native iOS there is a way to use a visual element.  Is there a reason that Xamarin does not allow for some kind of custom View to be added (or am I missing something).

I understand wanting to keep thing simple in what is displayed, but would be nice to have a little more control over what can be displyed

Reply
0 Kudos
4 Replies
Highlighted
Esri Frequent Contributor

Due to a limitation in Xamarin.Forms itself we unfortunately can't support it at this point.

Having said that, I'd actually recommend against showing too much info in the callout itself as it blocks the map - especially on a mobile device. Instead use the callout to quickly identify a feature by-name, and use the image button in the callout to go to a more full-screen feature-centric view to work with the feature.

Reply
0 Kudos
Highlighted
MVP Regular Contributor

I really didn't want to display a lot of information, just one or two lines with the button like the Callout, but with an ability to scroll through a set of features that were identified.  Then use the button to display a more complete list of attributes in a panel  The need stems from having features very close together so being able to tap the single feature is impossible.

We already have implemented a select tool to return things as a list in a side panel we can use that same approach for doing an identify, just thought it would be nice to have it done within the map view

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

The only thing I can think of is that you get the MapViewRenderer for the MapView control (we exposed that in 100.6) and get the native MapView control and use it's ShowCallout method that takes a native view. It's slightly involved though and requires you to write platform-specific code (but you could probably wrap it in a multi-targeted helper-project).

Reply
0 Kudos
Highlighted
MVP Regular Contributor

Maybe in a another release   For now we will just use a list to show the features in the selected area and the user can then select an item to investigate more fully

Reply
0 Kudos