These are the steps to follow in order to display inside your software/web application the positions computed by Dragonfly on the floor plan image uploaded inside the Dragonfly Cloud Dashboard:
Step 1 – Determine the Floor plan ID
Determine the {FloorplanID} of the floor plan that you want to visualize inside your application. This can be done by following these steps:
- Access the Dragonfly dashboard at at this link.
- From the top right corner of the screen select the Site ID 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 Floor plan ID column (e.g. it is an alphanumeric string like this “jbk5aaybku“).
Step 2 – Download the floor plan KML and image
Create a function inside your application in order to download:
- The KML file with the geo-references of the images:
- https://s3.eu-central-1.amazonaws.com/onit.its.floorplans/{SiteID}/{FloorplanID}_a.kml
- The floor plan image:
- https://s3.eu-central-1.amazonaws.com/onit.its.floorplans/{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 floor plan image. Please try with GIF or JPG or PNG.
Step 3 – Display the floor plan and position inside your application
Once you have the KML files and the floor plan images you have 2 options:
OPTION 1 – positions as WGS84 coordinates
- parse the information available inside the KML file to retrieve the four boundaries of the floor plan image.
- overlay the floor plan image on Google or Open Street map or on any other map using the info retrieved at the previous point.
- display the WGS84 coordinates returned by Dragonfly on the floor plan image!
OPTION 2 – positions as pixel of the floor plan image
- display the floor plan image inside your application (without having to use the KML file and without having to overly the floor plan image on any underlying map).
- convert WGS84 coordinates returned by Dragonfly into pixels of a floor plan image following the instruction at this link.
- display the position (converted into pixels) on the floor plan image!