### Start location and region update example (Java) Source: https://docs.indooratlas.com/groundsage-sdk-android/latest/code%20examples Registers location and region listeners and starts the subscription to receive location updates and monitor region changes. ```java private IALocationListener mIALocationListener = new IALocationListener() { @Override public void onLocationChanged(IALocation iaLocation) { } @Override public void onStatusChanged(String provider, int status, Bundle extras) { } }; private IARegion.Listener mRegionListener = new IARegion.Listener() { @Override public void onEnterRegion(IARegion iaRegion) { } @Override public void onExitRegion(IARegion iaRegion) { } }; public void startLocationAndRegionUpdateExample() { IAGSManager mgr = IAGSManager.Companion.getInstance(this); // start receiving location updates & monitor region changes mgr.registerLocationListener(mIALocationListener); mgr.registerRegionListener(mRegionListener); mgr.startSubscription(); } ``` -------------------------------- ### Start/stop wayfinding example (Java) Source: https://docs.indooratlas.com/groundsage-sdk-android/latest/code%20examples Shows how to start wayfinding updates with a destination (floor, latitude, longitude) and how to stop them. ```java private IAWayfindingRequest mWayfindingDestination; private IAWayfindingListener mWayfindingListener = new IAWayfindingListener() { @Override public void onWayfindingUpdate(IARoute route) { } }; /** * Start wayfinding example */ public void startWayfindingExample() { IAGSManager mgr = IAGSManager.Companion.getInstance(this); mWayfindingDestination = new IAWayfindingRequest.Builder() .withFloor(floor) .withLatitude(latitude) .withLongitude(longitude) .build(); mgr.requestWayfindingUpdates(mWayfindingDestination, mWayfindingListener); } /** * Stop wayfinding example */ public void stopWayfindingExample() { IAGSManager mgr = IAGSManager.Companion.getInstance(this); mgr.removeWayfindingUpdates(); } ``` -------------------------------- ### Start and stop wayfinding with GroundSage SDK Source: https://docs.indooratlas.com/groundsage-sdk-android/latest/Migration Shows how to start and stop wayfinding using GroundSage SDK. The example includes a listener with a TODO placeholder for handling wayfinding updates. ```kotlin private lateinit var iaWayfindingRequest: IAWayfindingRequest private val iaWayfindingListener:IAWayfindingListener = object : IAWayfindingListener { override fun onWayfindingUpdate(route: IARoute?) { TODO("Not yet implemented") } } /** * Start wayfinding example */ fun startWayfindingExample() { val mgr = IAGSManager.getInstance(this) iaWayfindingRequest = IAWayfindingRequest.Builder() .withFloor(floor) .withLatitude(latitude) .withLongitude(longitude) .build() mgr.requestWayfindingUpdates(iaWayfindingRequest, iaWayfindingListener) } /** * Stop wayfinding example */ fun stopWayfindingExample() { val mgr = IAGSManager.getInstance(this) mgr.removeWayfindingUpdates() } ``` -------------------------------- ### Start/stop wayfinding example (Kotlin) Source: https://docs.indooratlas.com/groundsage-sdk-android/latest/code%20examples Shows how to start wayfinding updates with a destination (floor, latitude, longitude) and how to stop them. ```kotlin private lateinit var iaWayfindingRequest: IAWayfindingRequest private val iaWayfindingListener:IAWayfindingListener = object : IAWayfindingListener { override fun onWayfindingUpdate(route: IARoute?) { TODO("Not yet implemented") } } /** * Start wayfinding example */ fun startWayfindingExample() { val mgr = IAGSManager.getInstance(this) iaWayfindingRequest = IAWayfindingRequest.Builder() .withFloor(floor) .withLatitude(latitude) .withLongitude(longitude) .build() mgr.requestWayfindingUpdates(iaWayfindingRequest, iaWayfindingListener) } /** * Stop wayfinding example */ fun stopWayfindingExample() { val mgr = IAGSManager.getInstance(this) mgr.removeWayfindingUpdates() } ``` -------------------------------- ### Start location and region update example (Kotlin) Source: https://docs.indooratlas.com/groundsage-sdk-android/latest/code%20examples Registers location and region listeners and starts the subscription to receive location updates and monitor region changes. ```kotlin private val mIALocationListener: IALocationListener = object : IALocationListener { override fun onLocationChanged(iaLocation: IALocation) {} override fun onStatusChanged(provider: String, status: Int, extras: Bundle) {} } private val mRegionListener: IARegion.Listener = object : IARegion.Listener { override fun onEnterRegion(iaRegion: IARegion) {} override fun onExitRegion(iaRegion: IARegion) {} } fun startLocationAndRegionUpdateExample() { val mgr = IAGSManager.getInstance(this) // start receiving location updates & monitor region changes mgr.registerLocationListener(mIALocationListener) mgr.registerRegionListener(mRegionListener) mgr.startSubscription() } ``` -------------------------------- ### FloorPlan pixelsToMeters example Source: https://docs.indooratlas.com/cordova/latest Example value for the FloorPlan pixelsToMeters conversion factor. ```json 0.05 ``` -------------------------------- ### FloorPlan name example Source: https://docs.indooratlas.com/cordova/latest Example value for the FloorPlan name property, a string. ```json "Ground Floor" ``` -------------------------------- ### FloorPlan metersToPixels example Source: https://docs.indooratlas.com/cordova/latest Example value for the FloorPlan metersToPixels conversion factor. ```json 20.48 ``` -------------------------------- ### Venue name example Source: https://docs.indooratlas.com/cordova/latest Example value for the Venue name property, a string. ```json "Local Shopping Mall" ``` -------------------------------- ### Start location updates with IndoorAtlas SDK 3.x Source: https://docs.indooratlas.com/groundsage-sdk-android/latest/Migration Shows how to start location updates and region monitoring using IndoorAtlas SDK 3.x. This is the old approach that should be replaced with the GroundSage SDK equivalent. ```kotlin fun startLocationUpdates() { var locationManager = IALocationManager.create(this) val request = IALocationRequest.create() locationManager?.requestLocationUpdates(request, this) locationManager?.registerRegionListener(this) } ``` -------------------------------- ### FloorPlan widthMeters example Source: https://docs.indooratlas.com/cordova/latest Example value for the FloorPlan widthMeters property, a number representing meters. ```json 50 ``` -------------------------------- ### Start location and region updates with GroundSage SDK Source: https://docs.indooratlas.com/groundsage-sdk-android/latest/Migration Shows how to start location updates and region monitoring using GroundSage SDK. This is the recommended replacement for the IndoorAtlas SDK 3.x approach. ```kotlin fun startLocationAndRegionUpdateExample() { val mgr = IAGSManager.getInstance(this) // start receiving location updates & monitor region changes mgr.registerLocationListener(mIALocationListener) mgr.registerRegionListener(mRegionListener) mgr.startSubscription() } ``` -------------------------------- ### startMonitoringForWayfinding: Source: https://docs.indooratlas.com/ios/latest/classes/ialocationmanager Start monitoring for wayfinding updates. ```APIDOC ## startMonitoringForWayfinding: ### Description Start monitoring for wayfinding updates. Calling this method causes the location manager to obtain a route from the user's current location to the destination defined in the parameter `to`. The delegate is notified via `indoorLocationManager:didUpdateRoute:`. Subsequent calls overwrite previously done requests. ### Declaration **Objective-C** ```objc - (void)startMonitoringForWayfinding: (nonnull id)to; ``` **Swift** ```swift func startMonitoring(forWayfinding to: any NSObjectProtocol & IALatLngFloorCompatible) ``` ### Parameters - **to** (id) - Required - An object specifying the wayfinding destination. Must be used to apply optional tags based filtering in wayfinding routing. ### Return Value None. ``` -------------------------------- ### FloorPlan url example Source: https://docs.indooratlas.com/cordova/latest Example value for the FloorPlan url property, a string containing a URL to a bitmap resource. ```json "https://example.com/d346ea8a-3d1d-44a3-9c8b-3d4fa440a779.png" ``` -------------------------------- ### Start and stop wayfinding with GroundSage SDK Source: https://docs.indooratlas.com/groundsage-sdk-ios/latest/migration Shows how to start and stop wayfinding using GroundSage SDK. Includes a delegate method for route updates and uses IAWayfindingRequest to specify the destination. ```swift func indoorLocationManager(_ manager: IALocationManager, didUpdate route: IARoute) { } /** * Start wayfinding example */ func testWayfinding(_ floor:Int, _ latitude: CLLocationDegrees, _ longitude: CLLocationDegrees) { let wayfinding = IAWayfindingRequest() wayfinding.floor = floor wayfinding.coordinate = CLLocationCoordinate2D(latitude: latitude, longitude: longitude) let mgr = IAGSManager.shared mgr.addLocationManagerDelegate(self) mgr.startMonitoring(forWayfinding: wayfinding) } /** * Stop wayfinding example */ func stopWayfindingExample() { var mgr = IAGSManager.shared mgr.stopMonitoringForWayfinding() } ``` -------------------------------- ### Start location updates with IndoorAtlas SDK 3.x Source: https://docs.indooratlas.com/groundsage-sdk-ios/latest/migration Starts location updates using IndoorAtlas SDK 3.x. This is the old approach that should be replaced with the GroundSage SDK equivalent. ```swift func startIALocationUpdates() { var locationManager = IALocationManager.sharedInstance() locationManager.delegate = self locationManager.startUpdatingLocation() } ``` -------------------------------- ### Geofence name example Source: https://docs.indooratlas.com/cordova/latest Example value for the 'name' property of a Geofence. ```plaintext 'Meeting room A101' ``` -------------------------------- ### Register Callback and Start Subscription Source: https://docs.indooratlas.com/groundsage-sdk-ios/latest/code-examples Register a delegate and start a subscription to receive density and region callbacks. The delegate methods didUpdate, didEnterDensityRegion, and didExitDensityRegion are implemented. ```swift @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate, IAGSManagerDelegate { func didUpdate(manager: IAGSManager, venueDensity: IAGSVenueDensity) { print("density : \(venueDensity)") } func didEnterDensityRegion(_ manager: IAGSManager, region: IARegion) { print("Enter region : \(region)") } func didExitDensityRegion(_ manager: IAGSManager, region: IARegion) { print("Exit region : \(region)") } func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // set your api key and api secret. You do this step through add *IAGSApiKey* and *IAGSSecretKey* to application plist IAGSManager.shared.setApiKey("SET YOUR API KEY HERE", andSecret: "SET YOUR SECRET KEY HERE") // register delegate for subscription callback IAGSManager.shared.addGroundSageDelegate(self) // start subscription IAGSManager.shared.startSubscription() return true } } ``` ```objective-c @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. // set your api key and api secret. You do this step through add *IAGSApiKey* and *IAGSSecretKey* to application plist [[IAGSManager sharedManager] setApiKey:@"SET YOUR API KEY HERE" andSecret:@"SET YOUR SECRET KEY HERE"]; // register delegate for subscription callback [[IAGSManager sharedManager] addGroundSageDelegate:self]; // start subscription [[IAGSManager sharedManager] startSubscription]; return YES; } #pragma mark - IAGSManager delegate - (void)didUpdate:(IAGSManager *)manager venueDensity:(IAGSVenueDensity *)venueDensity { NSLog(@"venueDensity = %@", venueDensity); } - (void)didEnterDensityRegion:(IAGSManager *)manager region:(IARegion *)region { NSLog(@"Enter region = %@", region); } - (void)didExitDensityRegion:(IAGSManager *)manager region:(IARegion *)region { NSLog(@"Exit region = %@", region); } @end ``` -------------------------------- ### FloorPlan heightMeters example Source: https://docs.indooratlas.com/cordova/latest Example value for the FloorPlan heightMeters property, a number representing meters. ```json 25 ``` -------------------------------- ### Start venue density subscription (Kotlin) Source: https://docs.indooratlas.com/groundsage-sdk-android/latest/code%20examples Sets the API key and secret, adds a GroundSage listener, and starts the subscription to receive venue density updates. The listener callbacks onUpdateDensity, onEnterDensityRegion, and onExitDensityRegion are implemented to log updates. ```kotlin void subscriptionVenueDensityExample() { IAGSManager sdk = IAGSManager.Companion.getInstance(this); // set your api key and api secret. sdk.setApiKey( "SET YOUR API KEY HERE", "YOUR SECRET KEY HERE" ); sdk.addGroundSageListener(this); // start subscription to request venue density sdk.startSubscription(); } @Override public void onUpdateDensity(@Nullable IAGSVenueDensity venueDensity) { Log.d(TAG, String.format("Update density = %s", venueDensity)); } @Override public void onEnterDensityRegion(@NotNull IARegion region) { Log.d(TAG, String.format("Enter region = %s", region)); } @Override public void onExitDensityRegion(@NotNull IARegion region) { Log.d(TAG, String.format("Exit region = %s", region)); } } ``` -------------------------------- ### startSubscription() Source: https://docs.indooratlas.com/groundsage-sdk-ios/latest/classes/iagsmanager Starts the subscription service to receive region entry events. ```APIDOC ## startSubscription() ### Description Starts subscribing to the service. The SDK will broadcast an event when the user enters a specified region. ### Declaration ```swift public func startSubscription() ``` ### Throws - Error if API key is not set. ``` -------------------------------- ### POI name example Source: https://docs.indooratlas.com/cordova/latest Example value for the POI name property, a string. ```json 'Reception desk' ``` -------------------------------- ### startMonitoringForGeofence: Source: https://docs.indooratlas.com/ios/latest/classes/ialocationmanager Starts monitoring the specified geofence. ```APIDOC ## startMonitoringForGeofence: ### Description Starts monitoring the specified geofence. Cloud geofences are monitored automatically. Call this method once for each geofence you want to monitor. If an existing geofence with the same identifier is already being monitored, the old geofence is replaced by the new one. Geofence events are delivered to the delegate's `indoorLocationManager:didEnterRegion:` and `indoorLocationManager:didExitRegion:` methods. ### Declaration **Objective-C** ```objc - (void)startMonitoringForGeofence:(nonnull IAGeofence *)geofence; ``` **Swift** ```swift func startMonitoring(for geofence: IAGeofence) ``` ### Parameters - **geofence** (IAGeofence) - Required - The geofence object that defines the boundary to monitor. ### Return Value None. ``` -------------------------------- ### FloorPlan id example Source: https://docs.indooratlas.com/cordova/latest Example value for the FloorPlan id property, a string containing a UUID. ```json "5be07da6-6c8b-4fb8-b4a7-9b093fbb4dbb" ``` -------------------------------- ### Start location updates with GroundSage SDK Source: https://docs.indooratlas.com/groundsage-sdk-ios/latest/migration Starts location updates using GroundSage SDK. Use this instead of the IndoorAtlas SDK 3.x method. ```swift func startLocationUpdates() { var mgr = IAGSManager.shared mgr.addLocationManagerDelegate(self) mgr.startSubscription() } ``` -------------------------------- ### FloorPlan bitmapHeight example Source: https://docs.indooratlas.com/cordova/latest Example value for the FloorPlan bitmapHeight property, a number representing pixels. ```json 1024 ``` -------------------------------- ### FloorPlan floorLevel example Source: https://docs.indooratlas.com/cordova/latest Example value for the FloorPlan floorLevel property, a number representing the logical floor level. ```json 2 ``` -------------------------------- ### FloorPlan bottomLeft example Source: https://docs.indooratlas.com/cordova/latest Example value for the FloorPlan bottomLeft property, an array in lon, lat sequence. ```json [24.1234, 63.1234] ``` -------------------------------- ### iOS Podfile setup Source: https://docs.indooratlas.com/technical/release-notes/sdk-31-release-information Update your Podfile to use IndoorAtlas SDK 3.1.4 on iOS. ```ruby use_frameworks! source 'https://github.com/IndoorAtlas/CocoaPods-Specs.git' platform :ios, '8.0' pod 'IndoorAtlas', '3.1.4' ``` -------------------------------- ### startUpdatingLocation Source: https://docs.indooratlas.com/ios/latest/classes/ialocationmanager Starts the generation of updates that report the user's current location. ```APIDOC ## startUpdatingLocation ### Description Starts the generation of updates that report the user's current location. This method returns immediately and causes the location manager to obtain an initial location fix and notify the delegate via `indoorLocationManager:didUpdateLocations:`. Subsequent calls do not automatically generate new events unless `stopUpdatingLocation` is called in between. ### Declaration **Objective-C** ```objc - (void)startUpdatingLocation; ``` **Swift** ```swift func startUpdatingLocation() ``` ### Parameters None. ### Return Value None. ``` -------------------------------- ### IndoorAtlas.watchPosition Source: https://docs.indooratlas.com/cordova/latest Starts IndoorAtlas positioning and invokes the callback when the position changes. ```APIDOC ## IndoorAtlas.watchPosition(onPosition, options) ### Description Starts IndoorAtlas positioning and invokes the callback when the position changes. ### Method watchPosition ### Parameters - **onPosition** (function (Position)) - Required - Callback that executes when the position changes, receiving an `IndoorAtlas.Position` object. - **options** (object) - Optional - Positioning options. - **options.minChangeMeters** (number) - Optional - Distance filter in meters; minimum distance change before reporting a new position. - **options.minIntervalSeconds** (number) - Optional - Time filter in seconds; minimum time between updates. Default is 2. - **options.positioningMode** (string) - Optional - Positioning mode: `HIGH_ACCURACY`, `LOW_POWER`, or `CART`. Default is `HIGH_ACCURACY`. ### Returns - **object** - Returns `this` to allow chaining. ### Example ```javascript IndoorAtlas.watchPosition(position => { console.log(` ${position.coords.latitude} ${position.coords.longitude} ${position.coords.floor}`); }); ``` ``` -------------------------------- ### GET /floor_plans/{floorPlanId} Source: https://docs.indooratlas.com/positioning-api Retrieve a floor plan by its identifier. ```APIDOC ## GET /floor_plans/{floorPlanId} ### Description Retrieve a floor plan by its identifier. ### Method GET ### Endpoint /floor_plans/{floorPlanId} ### Parameters #### Path Parameters - **floorPlanId** (string) - Required - The floor plan identifier. ### Response #### Success Response (200) - **id** (string) - The floor plan identifier. - **name** (string) - The floor plan name. - **url** (string) - The floor plan image URL. #### Response Example { "id": "string", "name": "string", "url": "string" } ``` -------------------------------- ### IndoorAtlas.watchFloorPlan Source: https://docs.indooratlas.com/cordova/latest Starts observing floor plan changes and invokes the callback when the floor plan changes. ```APIDOC ## IndoorAtlas.watchFloorPlan(onFloorPlanChange) ### Description Starts observing floor plan changes and invokes the callback when the floor plan changes. ### Method watchFloorPlan ### Parameters - **onFloorPlanChange** (function (FloorPlan)) - Required - Callback that executes when the floor plan changes. Receives `null` if not currently on any floor plan. ### Returns - **object** - Returns `this` to allow chaining. ### Example ```javascript IndoorAtlas.watchFloorPlan(floorPlan => { if (floorPlan) { console.log(`entered floor plan ${floorPlan.name}`); } }); ``` ``` -------------------------------- ### requestWayfindingUpdates(IALatLngFloorCompatible to, IAWayfindingListener listener) Source: https://docs.indooratlas.com/android/latest/com/indooratlas/android/sdk/ialocationmanager Starts wayfinding updates with a listener. ```APIDOC ## IALocationManager.requestWayfindingUpdates(IALatLngFloorCompatible to, IAWayfindingListener listener) ### Description Starts requesting wayfinding updates with a listener. ### Method requestWayfindingUpdates ### Parameters - **to** (IALatLngFloorCompatible) - Required - The destination location. - **listener** (IAWayfindingListener) - Required - The listener to receive wayfinding updates. ### Returns void ``` -------------------------------- ### Watch position and log coordinates Source: https://docs.indooratlas.com/cordova/latest Start positioning and log latitude, longitude, and floor to the console. ```javascript IndoorAtlas.watchPosition(position => { console.log(` ${position.coords.latitude} ${position.coords.longitude} ${position.coords.floor}`); }); ``` -------------------------------- ### onStatusChanged: Start observing status changes Source: https://docs.indooratlas.com/cordova/latest Registers a callback that executes when the IndoorAtlas service status changes. Returns 'this' for chaining. The example passes console.log as the callback. ```JavaScript IndoorAtlas.onStatusChanged(console.log); ``` -------------------------------- ### startWayfinding(IALatLngFloorCompatible to) Source: https://docs.indooratlas.com/android/latest/com/indooratlas/android/sdk/iaarsession Start AR wayfinding and enable the high-level AR wayfinding helper API, which manages the coordinates of certain wayfinding elements in the AR coordinate system in a visually consistent manner. ```APIDOC ## startWayfinding(IALatLngFloorCompatible to) ### Description Start AR wayfinding and enable the high-level AR wayfinding helper API, which manages the coordinates of certain wayfinding elements in the AR coordinate system in a visually consistent manner. ### Method startWayfinding ### Parameters - `to` (IALatLngFloorCompatible) - Required - Destination. ### Returns void ``` -------------------------------- ### startWayfinding(IALatLngFloorCompatible to) Source: https://docs.indooratlas.com/android/latest/com/indooratlas/android/sdk/iaarsession Starts AR wayfinding and enables the high-level AR wayfinding helper API, which manages the coordinates of certain wayfinding elements in the AR coordinate system in a visually consistent manner. ```APIDOC ## startWayfinding(IALatLngFloorCompatible to) ### Description Start AR wayfinding and enable the high-level AR wayfinding helper API, which manages the coordinates of certain wayfinding elements in the AR coordinate system in a visually consistent manner. The available managed elements are: 1. Target object (getWayfindingTarget) 2. Compass arrow (getWayfindingTurnArrows) 3. Turn-by-turn navigation arrows (getWayfindingCompassArrow). Calling this will stop and replace any existing wayfinding session in the SDK, including those created directly in IALocationManager. ### Method startWayfinding ### Parameters - `to` (IALatLngFloorCompatible) - Required - Wayfinding target / destination. `IAWayfindingRequest` must be used to apply optional tags based filtering in wayfinding routing. ### Returns - `void` ``` -------------------------------- ### Initialize and watch position in deviceready Source: https://docs.indooratlas.com/cordova/latest Initialize IndoorAtlas in the deviceready callback, start watching position, and auto-stop after 60 seconds. ```javascript document.addEventListener('deviceready', () => { // start positioning IndoorAtlas.initialize({ apiKey: YOUR_IA_API_KEY }) .watchPosition(position => { console.log( "latitude: " + position.coords.latitude + ", " + "longitude: " + position.coords.longitude + ", " + "floor: " + position.coords.floor); }); // auto-stop positioning after 60 seconds setTimeout(() => IndoorAtlas.clearWatch(), 60000); }, false); ``` -------------------------------- ### Automatically generate licensing information with post_install (SDK 3.4.0+) Source: https://docs.indooratlas.com/ios/latest/cocoapods Use this post_install hook in your Podfile to automatically copy the Pods-Acknowledgements.plist into your app's Settings.bundle. Requires IndoorAtlas SDK 3.4.0 or later. ```ruby post_install do |installer| require 'fileutils' FileUtils.cp_r('Pods/Pods-Acknowledgements.plist', 'Resources/Settings.bundle/Acknowledgements.plist', :remove_destination => true) end ``` -------------------------------- ### Geofence coordinates example Source: https://docs.indooratlas.com/cordova/latest Example array of coordinate objects for the 'coordinates' property of a Geofence. ```javascript [ { latitude: 65.01, longitude: 25.50 }, { latitude: 65.02, longitude: 25.51 }, { latitude: 65.01, longitude: 25.52 }, { latitude: 65.01, longitude: 25.50 }, ] ``` -------------------------------- ### Geofence id example Source: https://docs.indooratlas.com/cordova/latest Example value for the 'id' property of a Geofence, a UUID string. ```plaintext '12345678-90ab-cdef-1234-567890abcdef' ``` -------------------------------- ### Venue id example Source: https://docs.indooratlas.com/cordova/latest Example value for the Venue id property, a string containing a UUID. ```json "bd169e67-33a9-418d-a3e3-caf98ff01877" ``` -------------------------------- ### startSubscription() method declaration Source: https://docs.indooratlas.com/groundsage-sdk-ios/latest/classes/iagsmanager Starts subscribing to the service. Broadcasts an event when the user enters a specified region. Throws an error if the API key is not set. ```swift public func startSubscription() ``` -------------------------------- ### startMonitoring(forWayfinding:) Source: https://docs.indooratlas.com/groundsage-sdk-ios/latest/classes/iagsmanager Starts monitoring for wayfinding updates. This method obtains a route from the user's current location to the destination and notifies the delegate with the route. Subsequent updates are generated whenever the route changes. ```APIDOC ## startMonitoring(forWayfinding:) ### Description Start IALocationManager monitoring for wayfinding updates. Calling this method causes the location manager to obtain a route from user’s current location to destination defined in parameter “request” (this may take several seconds). Calling this method notify your delegate by calling its indoorLocationManager:didUpdateRoute: method. After that, the receiver generates update events whenever the route changes. Calling this method several times in succession overwrites the previously done requests. Calling stopUpdatingLocation in-between, however, does cause a new initial event to be sent the next time you call this method. ### Declaration Swift ```swift public func startMonitoring(forWayfinding: IALatLngFloorCompatible) ``` ### Parameters - **forWayfinding** (IALatLngFloorCompatible) - An IALatLngFloorCompatible object specifying the wayfinding destination. ``` -------------------------------- ### FloorPlan bitmapWidth example Source: https://docs.indooratlas.com/cordova/latest Example value for the FloorPlan bitmapWidth property, a number representing pixels. ```json 2048 ``` -------------------------------- ### startMonitoring(for:) Source: https://docs.indooratlas.com/groundsage-sdk-ios/latest/classes/iagsmanager Starts monitoring the specified geofence. Cloud geofences are monitored automatically, but this method must be called for each geofence you want to monitor. Geofence events are delivered to the delegate's didEnterRegion and didExitRegion methods. ```APIDOC ## startMonitoring(for:) ### Description Starts IALocationManager monitoring the specified geofence. Note that cloud geofences are monitored automatically. You must call this method once for each geofence you want to monitor. If an existing geofence with the same identifier is already being monitored by the app, the old geofence is replaced by the new one. Geofence events are delivered as regions to the indoorLocationManager:didEnterRegion: and indoorLocationManager:didExitRegion: methods of your delegate. ### Declaration Swift ```swift @objc(startMonitoringForGeofence:) public func startMonitoring(for geofence: IAGeofence) ``` ### Parameters - **for** (IAGeofence) - The geofence object that defines the boundary to monitor. ``` -------------------------------- ### CurrentStatus name example Source: https://docs.indooratlas.com/cordova/latest Example value for the 'name' property of CurrentStatus, showing a status name string. ```plaintext "AVAILABLE" ``` -------------------------------- ### Initialize IndoorAtlas with API key Source: https://docs.indooratlas.com/cordova/latest Initialize IndoorAtlas with a specific API key. ```javascript IndoorAtlas.initialize({ apiKey: "3795eee9-efaf-47db-8347-316b6bb0c834" }) ``` -------------------------------- ### Start GroundSage subscription in foreground service Source: https://docs.indooratlas.com/groundsage-sdk-android/latest/background%20guideline Start GroundSage location subscription when the app is launched. Call IAGSManager.startSubscription() in a foreground service's onCreate() to begin persistent location data acquisition. The service should be started when the app is launched. ```kotlin class ForegroundService : Service() { override fun onCreate() { ... IAGSManager.shared.startSubscription() ... } } ``` -------------------------------- ### create(Context context, Bundle extras, IndoorAtlasStorage storage) Source: https://docs.indooratlas.com/android/latest/com/indooratlas/android/sdk/ialocationmanager Creates a new IALocationManager instance with external storage. ```APIDOC ## IALocationManager.create(Context context, Bundle extras, IndoorAtlasStorage storage) ### Description Creates a new instance of IALocationManager with external storage. ### Method create ### Parameters - **context** (Context) - Required - The application context. - **extras** (Bundle) - Required - Additional configuration options. - **storage** (IndoorAtlasStorage) - Required - External storage for the SDK. ### Returns - **IALocationManager** - A new instance of IALocationManager. ``` -------------------------------- ### FloorPlan bearing example Source: https://docs.indooratlas.com/cordova/latest Example value for the FloorPlan bearing property, a number representing degrees East of true North. ```json 143 ``` -------------------------------- ### values() method and iteration example Source: https://docs.indooratlas.com/android/latest/com/indooratlas/android/sdk/iaroute.error Returns an array of the enum constants in declaration order. The example shows iterating over the constants with a for-each loop. ```java public static IARoute.Error[] values() ``` ```java for (IARoute.Error c : IARoute.Error.values())   System.out.println(c); ``` -------------------------------- ### IndoorAtlas.initialize Source: https://docs.indooratlas.com/cordova/latest Initializes the IndoorAtlas location manager with the provided API key. Must be called before using other methods. ```APIDOC ## IndoorAtlas.initialize(configuration) ### Description Initializes the IndoorAtlas location manager with the provided API key. Must be called before using other methods, typically in the Cordova 'deviceready' callback or later. ### Method initialize ### Parameters - **configuration** (object) - Required - Configuration object containing the API key. - **configuration.apiKey** (string) - Required - IndoorAtlas API key. ### Returns - **object** - Returns `this` to allow chaining. ### Example ```javascript IndoorAtlas.initialize({ apiKey: "3795eee9-efaf-47db-8347-316b6bb0c834" }) ``` ``` -------------------------------- ### GET /venues/{venueId}/wayfinding/geojson Source: https://docs.indooratlas.com/mapping-api Get wayfinding graph for a venue as GeoJSON. This endpoint retrieves the wayfinding graph for a venue in GeoJSON format. ```APIDOC ## GET /venues/{venueId}/wayfinding/geojson ### Description Get wayfinding graph for a venue as GeoJSON. ### Method GET ### Endpoint /venues/{venueId}/wayfinding/geojson ### Parameters #### Path Parameters - **venueId** (string) - Required - ID of the venue #### Query Parameters - **key** (string) - Optional - API key (alternative to X-API-Key header) ### Request Example No request body required. ### Response #### Success Response (200) - **geojson** (object) - Wayfinding graph as GeoJSON #### Response Example { "geojson": {} } ``` -------------------------------- ### build() Source: https://docs.indooratlas.com/android/latest/com/indooratlas/android/sdk/iawayfindingrequest.builder Create a IAWayfindingRequest from this IAWayfindingRequest.Builder. ```APIDOC ## build() ### Description Create a IAWayfindingRequest from this IAWayfindingRequest.Builder. ### Method Instance Method ### Signature `public IAWayfindingRequest build()` ### Returns - `IAWayfindingRequest` - The constructed IAWayfindingRequest. ### See Also - `IAGeofenceRequest` ``` -------------------------------- ### GET /floorplans/{floorPlanId}/paths/geojson Source: https://docs.indooratlas.com/mapping-api Get enabled (or all) paths for a floor plan as GeoJSON. This endpoint retrieves the paths for a floor plan in GeoJSON format. ```APIDOC ## GET /floorplans/{floorPlanId}/paths/geojson ### Description Get enabled (or all) paths for a floor plan as GeoJSON. ### Method GET ### Endpoint /floorplans/{floorPlanId}/paths/geojson ### Parameters #### Path Parameters - **floorPlanId** (string) - Required - ID of the floor plan #### Query Parameters - **key** (string) - Optional - API key (alternative to X-API-Key header) ### Request Example No request body required. ### Response #### Success Response (200) - **geojson** (object) - Paths as GeoJSON #### Response Example { "geojson": {} } ``` -------------------------------- ### build() Source: https://docs.indooratlas.com/android/latest/com/indooratlas/android/sdk/ialocation.builder Creates an IALocation from this IALocation.Builder. ```APIDOC ## build() ### Description Creates an IALocation from this IALocation.Builder. ### Method build ### Signature `public IALocation build()` ### Returns - **IALocation** - The constructed IALocation instance. ``` -------------------------------- ### GET /floorplans/{floorPlanId}/paths/{pathId}/geojson Source: https://docs.indooratlas.com/mapping-api Get a single path as GeoJSON. This endpoint retrieves a specific path for a floor plan in GeoJSON format. ```APIDOC ## GET /floorplans/{floorPlanId}/paths/{pathId}/geojson ### Description Get a single path as GeoJSON. ### Method GET ### Endpoint /floorplans/{floorPlanId}/paths/{pathId}/geojson ### Parameters #### Path Parameters - **floorPlanId** (string) - Required - ID of the floor plan - **pathId** (string) - Required - ID of the path #### Query Parameters - **key** (string) - Optional - API key (alternative to X-API-Key header) ### Request Example No request body required. ### Response #### Success Response (200) - **geojson** (object) - Path as GeoJSON #### Response Example { "geojson": {} } ``` -------------------------------- ### GET /venues/{venueId}/geofences/geojson Source: https://docs.indooratlas.com/mapping-api Get geofences and points of interest for a venue as GeoJSON. This endpoint retrieves geofences and points of interest for a venue in GeoJSON format. ```APIDOC ## GET /venues/{venueId}/geofences/geojson ### Description Get geofences and points of interest for a venue as GeoJSON. ### Method GET ### Endpoint /venues/{venueId}/geofences/geojson ### Parameters #### Path Parameters - **venueId** (string) - Required - ID of the venue #### Query Parameters - **key** (string) - Optional - API key (alternative to X-API-Key header) ### Request Example No request body required. ### Response #### Success Response (200) - **geojson** (object) - Geofences and points of interest as GeoJSON #### Response Example { "geojson": {} } ``` -------------------------------- ### Configure Podfile for GroundSageSDK with post_install hook Source: https://docs.indooratlas.com/groundsage-sdk-ios/latest Add the IndoorAtlas GroundSage SDK CocoaPods repository and the standard CocoaPods specs source to your Podfile. Then add the post_install hook to set BUILD_LIBRARY_FOR_DISTRIBUTION for the Apollo target, which is required for the SDK to work. ```ruby source 'https://dl.cloudsmith.io/public/indooratlas/groundsage-sdk-ios/cocoapods/index.git' source 'https://github.com/CocoaPods/Specs.git' ``` ```ruby post_install do |installer| installer.pods_project.targets.each do |target| if ['Apollo'].include? target.name target.build_configurations.each do |config| config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES' end end end end ``` -------------------------------- ### Generate licensing information for older SDK versions Source: https://docs.indooratlas.com/ios/latest/cocoapods For older IndoorAtlas SDK versions, use this post_install hook to copy the NOTICE file into the generated Acknowledgements.plist using a perl command. ```ruby post_install do |installer| system("perl -pe 's/IndoorAtlas Ltd./`cat NOTICE`/e' 'Pods/Target Support Files/Pods-simple-positioning-app/Pods-simple-positioning-app-Acknowledgements.plist' > 'Resources/Settings.bundle/Acknowledgements.plist'") end ``` -------------------------------- ### onStartCommand(Intent intent, int flags, int startId) Source: https://docs.indooratlas.com/android/latest/com/indooratlas/android/sdk/ialocationservice Called when the service is started with startService(). Overriding this method makes the service responsible for managing its own lifecycle and stopping when no more work is to be done. ```APIDOC ## onStartCommand(Intent intent, int flags, int startId) ### Description Called when the service is started with startService(). Overriding this method makes the service responsible for managing its own lifecycle and stopping when no more work is to be done. ### Method onStartCommand ### Signature ``` public int onStartCommand(Intent intent, int flags, int startId) ``` ### Parameters - `intent` (Intent) - Required - The Intent supplied to startService(). - `flags` (int) - Required - Additional data about this start request. - `startId` (int) - Required - A unique integer representing this specific start command. ### Returns - `int` - The return value indicates what semantics the system should use for the service's current started state. ### Overrides - `onStartCommand` in class `Service` ``` -------------------------------- ### GET /floorplans/{floorPlanId}/analytics/latest_map Source: https://docs.indooratlas.com/mapping-api Get analytics image overlays for latest generated map. This endpoint retrieves analytics image overlays for the latest generated map of a floor plan. ```APIDOC ## GET /floorplans/{floorPlanId}/analytics/latest_map ### Description Get analytics image overlays for latest generated map. ### Method GET ### Endpoint /floorplans/{floorPlanId}/analytics/latest_map ### Parameters #### Path Parameters - **floorPlanId** (string) - Required - ID of the floor plan #### Query Parameters - **key** (string) - Optional - API key (alternative to X-API-Key header) ### Request Example No request body required. ### Response #### Success Response (200) - **overlays** (array) - List of analytics image overlays #### Response Example { "overlays": [] } ``` -------------------------------- ### create(Context context, Bundle extras) Source: https://docs.indooratlas.com/android/latest/com/indooratlas/android/sdk/ialocationmanager Creates a new IALocationManager instance with a Bundle of extras for configuration. ```APIDOC ## IALocationManager.create(Context context, Bundle extras) ### Description Creates a new instance of IALocationManager with additional configuration extras. ### Method create ### Parameters - **context** (Context) - Required - The application context. - **extras** (Bundle) - Required - Additional configuration options. ### Returns - **IALocationManager** - A new instance of IALocationManager. ``` -------------------------------- ### build() Source: https://docs.indooratlas.com/android/latest/com/indooratlas/android/sdk/iapoi.builder Creates an IAPOI instance from this builder, throwing if required parameters are missing. ```APIDOC ## Method: build() ### Description Create a IAPOI from this IAPOI.Builder. ### Method build ### Signature `public IAPOI build()` ### Parameters None ### Returns A new IAPOI instance configured with the builder's settings. ### Throws - **IllegalArgumentException** - If a required parameter is not set. ### Example ```java IAPOI poi = builder.build(); ``` ``` -------------------------------- ### GET /venues/{venueId}/radios/geojson Source: https://docs.indooratlas.com/mapping-api Get BLE beacons and WiFi access points used in positioning in this venue as GeoJSON. This endpoint retrieves the radio information for a venue in GeoJSON format. ```APIDOC ## GET /venues/{venueId}/radios/geojson ### Description Get BLE beacons and WiFi access points used in positioning in this venue as GeoJSON. ### Method GET ### Endpoint /venues/{venueId}/radios/geojson ### Parameters #### Path Parameters - **venueId** (string) - Required - ID of the venue #### Query Parameters - **key** (string) - Optional - API key (alternative to X-API-Key header) ### Request Example No request body required. ### Response #### Success Response (200) - **geojson** (object) - Radio information as GeoJSON #### Response Example { "geojson": {} } ``` -------------------------------- ### GET /venues Source: https://docs.indooratlas.com/positioning-api List all venues. ```APIDOC ## GET /venues ### Description List all venues. ### Method GET ### Endpoint /venues ### Response #### Success Response (200) - **venues** (array of SimpleVenue) - The list of venues. #### Response Example { "venues": [ { "id": "string", "name": "string" } ] } ``` -------------------------------- ### Start GroundSage subscription on app launch Source: https://docs.indooratlas.com/groundsage-sdk-ios/latest/background-guideline Call IAGSManager.startSubscription() in didFinishLaunchingWithOptions to begin location data acquisition when the app launches. ```swift func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { ... IAGSManager.shared.startSubscription() ... return true } ``` -------------------------------- ### IAExtraInfo Source: https://docs.indooratlas.com/android/latest/com/indooratlas/android/sdk/iaextrainfo Documentation for the IAExtraInfo class, including its fields and constructor. ```APIDOC ## IAExtraInfo ### Description Immutable class containing extraneous SDK information returned by `IALocationManager.getExtraInfo()`. ### Fields - **version** (`String`) - SDK version. - **traceId** (`String`) - Trace ID used to identify a point in time during the SDK lifecycle. Can be null if cannot contact IndoorAtlas servers. ### Constructor - **IAExtraInfo(String version, String traceId)** - Constructor. ``` -------------------------------- ### getWayfindingTarget() Source: https://docs.indooratlas.com/android/latest/com/indooratlas/android/sdk/iaarsession Get the wayfinding target. ```APIDOC ## getWayfindingTarget() ### Description Get the wayfinding target. ### Method getWayfindingTarget ### Returns IAARObject - The target object. ``` -------------------------------- ### Add and remove geofences with GroundSage SDK Source: https://docs.indooratlas.com/groundsage-sdk-android/latest/Migration Shows how to add and remove geofences using GroundSage SDK. The example creates a circular geofence with a 5 m radius and 12 edges, and includes a listener with a TODO placeholder for geofence triggers. ```kotlin private var mIAGeofenceRequest: IAGeofenceRequest? = null private val mIAGeofenceListener: IAGeofenceListener = object: IAGeofenceListener { override fun onGeofencesTriggered(event: IAGeofenceEvent?) { TODO("Not yet implemented") } } /** * Geofences example */ fun addGeofencesExample(latitude: Double, longitude: Double) { // Add a circular geofence by adding points with a 5 m radius clockwise val radius = GEOFENCE_RADIUS_METERS val edgeCount = 12 val EARTH_RADIUS_METERS = 6.371e6 val latPerMeter = 1.0 / (EARTH_RADIUS_METERS * Math.PI / 180) val lonPerMeter = latPerMeter / Math.cos(Math.PI / 180.0 * latitude) val edges = ArrayList() for (i in 0 until edgeCount) { val angle = -2 * Math.PI * i / edgeCount val lat = latitude + radius * latPerMeter * Math.sin(angle) val lon = longitude + radius * lonPerMeter * Math.cos(angle) edges.add(doubleArrayOf(lat, lon)) } val geofenceId = "My geofence " + mRunningGeofenceId++ Log.d(TAG, "Creating a geofence with id \"$geofenceId\"") val geofence = IAGeofence.Builder() .withEdges(edges) .withId(geofenceId) .withName(geofenceId) .build() Log.i(TAG, "New geofence registered: $geofence") val mgr = IAGSManager.getInstance(this) mgr.addGeofences( IAGeofenceRequest.Builder() .withCloudGeofences(true) // listen also geofences defined in app.indooratlas.com .withGeofence(geofence) .build().also { mIAGeofenceRequest = it }, mIAGeofenceListener ) } /** * Remove geofences example */ fun removeGeofencesExample() { val mgr = IAGSManager.getInstance(this) mgr.removeGeofenceUpdates(mIAGeofenceListener) } ``` -------------------------------- ### getExtraInfo() Source: https://docs.indooratlas.com/android/latest/com/indooratlas/android/sdk/ialocationmanager Retrieves additional information from the SDK. ```APIDOC ## IALocationManager.getExtraInfo() ### Description Returns additional information not vital for the functionality of the SDK. ### Method getExtraInfo ### Parameters None ### Returns - **IAExtraInfo** - Additional information. ``` -------------------------------- ### watchWifis Source: https://docs.indooratlas.com/cordova/latest Starts observing wifi scans. ```APIDOC ## watchWifis ### Description Starts observing wifi scans. Only supported on Android. NOTE! To enable the callback, please contact IndoorAtlas support. ### Method watchWifis(onWifiScan: function (wifiScanCallback)): object ### Parameters - **onWifiScan** (function (wifiScanCallback)) - Required - A callback that executes whenever IA SDK internally scans wifis. ### Returns - `object` - Returns `this` to allow chaining. ### Example ```javascript IndoorAtlas.watchWifis((error, wifis) => { if (error) { console.log(`error scanning wifis: ${error.description}`); } else { console.log(`scanned wifi count: ${wifis.length}`); } }); ``` ```