Polestar Location Source
The Polestar (Radio signal-based positioning system) Location Source provides indoor location based on the analysis of radio signals transmitted and received inside buildings.
Requirements
Check common requirement.
Installation
Check common installation.
Permissions
Polestar Location Source requires Location and Bluetooth permissions. Declare NSLocationWhenInUseUsageDescription and NSBluetoothAlwaysUsageDescription in your app Info.plist as follows:
<key>NSLocationWhenInUseUsageDescription</key>
<string>Used to track user location</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>For Polestar</string>
Setting Up the Polestar Location Source
Once you have the MapData, create a PolestarLocationSource instance, then assign it to Map or/and GeoAR as follows:
func setupLocationSource(mapData: MapData) {
let polestarLocationSource = PolestarLocationSource(mapData: mapData, apiKey: "emulator") // change 'emulator' to your Polestar API key
// assign it to the map if you are using WemapMapSDK
map.userLocationManager.locationSource = polestarLocationSource
// or/and assign it to GeoARView if you are using WemapGeoARSDK
geoARView.locationManager.locationSource = polestarLocationSource
}
Examples
For additional examples and sample implementations of WemapSDKs, visit the official GitHub repository.
Clone the repository and follow the README instructions to run the sample application.