Show spinner after user changed map region in CPPointOfInterestTemplate

In the new CarPlay Parking app category under iOS 14, is it possible to show a spinner when using CPPointOfInterestTemplate and the user changed map region?

The reason why we would need this is that we query our servers for parking locations when the user changes map region.
There are simply too many possible results for all of them to be loaded onto the device before opening CPPointOfInterestTemplate.

Well, it's a late reply but still. As per the documentation there are no loading indicators in CarPlay templates. However you can use a trick:

  1. Create an array with only one almost empty CPPointOfInterest and set it's location to current user location(or some random location in the host country). Give it a title like "Loading.....", set the rest of the attributes to nil. like this:

let loadingPoI: [CPPointOfInterest] = [CPPointOfInterest(location: loadingItem, title: "Loading...", subtitle: nil, summary: nil, detailTitle: nil, detailSubtitle: nil, detailSummary: nil, pinImage: nil)]

  1. Use setter method to update your template every time before you start your lengthy calls.

template.setPointsOfInterest(loadingPoI, selectedIndex: Foundation.NSNotFound)

so your users will see "Loading..." and some location on the map displayed, whilst they are waiting for results.

Show spinner after user changed map region in CPPointOfInterestTemplate
 
 
Q