How to display the floor plan inside your App compiled with the Indoors SDK

There is no function inside the Indoors SDK for Android and iOS to fetch and display inside your application the floor plans previously uploaded using the Accuware dashboard. Anyway the process to fetch the floor plans is really simple:

Step 1 – Determine the {FloorplanID} of the floor plan that you want to visualize inside your App. This can be done by following these steps:

  • Access the Accuware dashboard at at this link.
  • From the Available Sites table please select (with the button on the RIGHT) the site that contains the floor plan of interest.
  • Click on General > Floor plans.
  • Take note of the {FloorplanID} of the floor plan of interest shown under the ID column (e.g. it is an alphanumeric string like this “jbk5aaybku“).

Step 2 – Create a function inside your App in order to download:

  1. The KML file with the geo-references of the images:
    • ORIGINAL  version – https://s3.amazonaws.com/navizon.its.fp/{SiteID}/{FloorplanID}_o.kml
    • ALIGNED version – https://s3.amazonaws.com/navizon.its.fp/{SiteID}/{FloorplanID}_a.kml
  2. The floor plan image:
    1. ORIGINAL version – https://s3.amazonaws.com/navizon.its.fp/{SiteID}/{FloorplanID}_o.png
    2. ALIGNED version – https://s3.amazonaws.com/navizon.its.fp/{SiteID}/{FloorplanID}_a.{Extension}

Where:

  • {SiteID} is the ID of the site.
  • {FloorplanID} is the ID of the floor plan.
  • {Extension} is the extension of the ORIGINAL floor plan image is the one of the original file used during the first upload of the floor plan. If you don’t remember the extension please try with GIF or JPG or PNG.

Step 3 – Once you have the KML file and the floor plan image you have 2 options:

OPTION 1:

  1. parse the information available inside the KML file to retrieve the geo-references of the floor plan image (e.g. KML parser for iOS and KML parser for Android).
  2. overlay the floor plan image on Google/Bing/Apple map or on any other map (e.g. overlay using Google Maps SDK for iOS and overlay using Google Maps API for Android) using the geo-references retrieved at the previous point.

You can now display the coordinates returned by Accuware API on the floor plan image!

OPTION 2:

  1. display the floor plan image inside your App (without having to use the KML file and without having to overly the floor plan image on any underlying map).
  2. convert the coordinates returned by Accuware API into pixels of a floor plan image following the instruction at this link.

You can now display the coordinates returned by Accuware API on the floor plan image!

When to fetch a floor plan? During the development of your App you can choose to manage the floor plans in several ways:

  1. you can program your App to retrieve the floor plans from the Accuware server each time the App is opened.
  2. you can program your App to retrieve the floor plans from your server each time the App is opened.
  3. you can program your App to download locally (inside the App) the floor plans the first time the App is launched (and search for updated floor plans once in a while)
  4. etc…