Skip to Content
0

Trying to display the FUIMapDetailPanelContentViewController

Feb 08 at 02:59 PM

116

avatar image

I am trying to display the VC FUIMapDetailPanelContentViewController and it does not work

Documentation:

https://help.sap.com/doc/978e4f6c968c4cc5a30f9d324aa4b1d7/Latest/en-US/Documents/Frameworks/SAPFiori/Classes/FUIMapDetailPanelContentViewController.html#/c:@M@SAPFiori@objc(cs)FUIMapDetailPanelContentViewController(im)initWithCoder:

I was able to create my FUIDetailPanelContainer and configure the searchResultsViewController and it is working fine. I have a VC showing a map and the side panel showing a SearchBar and a table view search result under it but how the detail panel is showed?

In the fiori guideline they say it could be show when the user select a marker on the map but how ?

thanks

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Stan Stadelman
Feb 10 at 08:17 PM
1

Hi Alex, you should handle the MapKit didSelectAnnotation delegate method when the annotation is selected.

There, update the dataSource for the FUIDetailPanelContainer.contentViewController.tableView, and any other properties which should be set. See here: https://help.sap.com/doc/978e4f6c968c4cc5a30f9d324aa4b1d7/Latest/en-US/Documents/Frameworks/SAPFiori/Classes/FUIMapDetailPanelContentViewController.html.

Last, invoke FUIDetailPanelContainer.pushChildViewController(), if the contentViewController is not already visible. https://help.sap.com/doc/978e4f6c968c4cc5a30f9d324aa4b1d7/Latest/en-US/Documents/Frameworks/SAPFiori/Classes/FUIDetailPanelContainer.html#/s:8SAPFiori23FUIDetailPanelContainerC23pushChildViewControlleryyF

Show 6 Share
10 |10000 characters needed characters left characters exceeded

thanks Stan, that's what I was searching --> FUIDetailPanelContainer.pushChildViewController()

and now after showing the panel, I need to dismiss it

very strange that the close button (the x button on the top right corner) does not do anything

Also I can't find any handler for it,

the only thing I have found is

           container.contentViewController.didSelectTitleHandler = { () in
self.container!.popChildViewController()
}

I could dismiss the detail panel when touching the first top section but as I said the close button does not work,

any idea ?

I am testing in the simulator with the latest version of Xcode, iPad 10.5, release fat framework

thanks

0
Former Member

Hi Alex,

Handle the dismissal of the panel in the MapKit didDeselectAnnotation delegate method.You can invoke FUIDetailPanelContainer.popChildViewController() to again show the search.

https://help.sap.com/doc/978e4f6c968c4cc5a30f9d324aa4b1d7/Latest/en-US/Documents/Frameworks/SAPFiori/Classes/FUIDetailPanelContainer.html#/s:8SAPFiori23FUIDetailPanelContainerC22popChildViewControlleryyF

After that is set, the close button when tapped will dismiss the contentViewController.The close button does not have a public didSelectHandler.

0

thanks Alex, that's getting better, I can see that the documentation has been updated recently ����

ok it now works on iPad but crash on iPhone,

every-time I called pop in deselect Annotation, it crash (only for iPhone)

also I get this annoying message in the console

Could not inset legal attribution from corner 4

any idea? thanks

0

Alexandre, want to make sure you're aware Alex is actively investigating. Will update asap.

-Stan

0

thanks Stan, no problem, if you want I could provide a sample app with mock data if you want

sometimes it works, but when doing multiple time or very fast it crash

Alex

0

I think we found it this afternoon: we *think* that a key value observation was being added to a non-optional var property, which is being replaced (not mutated). It seems the observation would have been pointing to the previous (now deinit) reference, and not carried over to the new instance which replaced it. That would make sense to me--we'll verify further, then put the fix into the next patch.

1