@situm/cordova 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/CHANGELOG_UNRELEASED.md +28 -0
- package/Jenkinsfile +84 -0
- package/LICENSE +21 -0
- package/README.md +472 -0
- package/azure/common-steps.yaml +5 -0
- package/azure-pipelines.yml +336 -0
- package/docs/JSDoc/MapView.html +300 -0
- package/docs/JSDoc/MapViewControllerImpl.html +299 -0
- package/docs/JSDoc/Situm.html +5257 -0
- package/docs/JSDoc/android_Interfaces.js.html +825 -0
- package/docs/JSDoc/android_situm.js.html +380 -0
- package/docs/JSDoc/fonts/glyphicons-halflings-regular.eot +0 -0
- package/docs/JSDoc/fonts/glyphicons-halflings-regular.svg +288 -0
- package/docs/JSDoc/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/docs/JSDoc/fonts/glyphicons-halflings-regular.woff +0 -0
- package/docs/JSDoc/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/docs/JSDoc/global.html +7538 -0
- package/docs/JSDoc/img/toast-ui.png +0 -0
- package/docs/JSDoc/index.html +90 -0
- package/docs/JSDoc/map-view-controller.js.html +307 -0
- package/docs/JSDoc/map-view.js.html +172 -0
- package/docs/JSDoc/scripts/jquery.min.js +2 -0
- package/docs/JSDoc/scripts/linenumber.js +30 -0
- package/docs/JSDoc/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/docs/JSDoc/scripts/prettify/lang-css.js +2 -0
- package/docs/JSDoc/scripts/prettify/prettify.js +28 -0
- package/docs/JSDoc/scripts/tui-doc.js +200 -0
- package/docs/JSDoc/styles/bootstrap.min.css +6 -0
- package/docs/JSDoc/styles/custom.css +23 -0
- package/docs/JSDoc/styles/prettify-jsdoc.css +111 -0
- package/docs/JSDoc/styles/prettify-tomorrow.css +132 -0
- package/docs/JSDoc/styles/tui-doc.css +485 -0
- package/docs/conf.json +28 -0
- package/docs/getting-started.md +298 -0
- package/docs/imagotype-SITUM-transparent-90.png +0 -0
- package/docs/static/styles/custom.css +23 -0
- package/package.json +60 -0
- package/plugin.xml +102 -0
- package/scripts/update_changelog.sh +22 -0
- package/src/android/app/build.gradle +51 -0
- package/src/android/app/proguard-rules.pro +21 -0
- package/src/android/app/src/main/AndroidManifest.xml +11 -0
- package/src/android/app/src/main/java/es/situm/plugin/DateUtils.java +15 -0
- package/src/android/app/src/main/java/es/situm/plugin/PluginHelper.java +919 -0
- package/src/android/app/src/main/java/es/situm/plugin/SitumMapper.java +968 -0
- package/src/android/app/src/main/java/es/situm/plugin/SitumPlugin.java +109 -0
- package/src/android/app/src/main/res/drawable/ic_launcher_background.xml +170 -0
- package/src/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +34 -0
- package/src/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
- package/src/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
- package/src/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/src/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/src/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/src/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/src/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/src/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/src/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/src/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/src/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/src/android/app/src/main/res/values/colors.xml +6 -0
- package/src/android/app/src/main/res/values/strings.xml +3 -0
- package/src/android/app/src/main/res/values/styles.xml +11 -0
- package/src/android/app/src/test/java/es/situm/plugin/PluginHelperTest.java +27 -0
- package/src/android/app/src/test/java/es/situm/plugin/SitumMapperTest.java +1485 -0
- package/src/android/app/src/test/java/es/situm/plugin/angle/AngleCreator.java +46 -0
- package/src/android/app/src/test/java/es/situm/plugin/bounds/BoundsCreator.java +50 -0
- package/src/android/app/src/test/java/es/situm/plugin/building/BuildingCreator.java +76 -0
- package/src/android/app/src/test/java/es/situm/plugin/cartesianCoordinate/CartesianCoordinateCreator.java +31 -0
- package/src/android/app/src/test/java/es/situm/plugin/circle/CircleCreator.java +41 -0
- package/src/android/app/src/test/java/es/situm/plugin/coordinate/CoordinateCreator.java +32 -0
- package/src/android/app/src/test/java/es/situm/plugin/dimensions/DimensionsCreator.java +31 -0
- package/src/android/app/src/test/java/es/situm/plugin/directionsRequest/DirectionsRequestCreator.java +105 -0
- package/src/android/app/src/test/java/es/situm/plugin/event/EventCreator.java +108 -0
- package/src/android/app/src/test/java/es/situm/plugin/floor/FloorCreator.java +58 -0
- package/src/android/app/src/test/java/es/situm/plugin/indication/IndicationCreator.java +40 -0
- package/src/android/app/src/test/java/es/situm/plugin/location/LocationCreator.java +197 -0
- package/src/android/app/src/test/java/es/situm/plugin/locationRequest/LocationRequestCreator.java +45 -0
- package/src/android/app/src/test/java/es/situm/plugin/locationStatus/LocationStatusCreator.java +211 -0
- package/src/android/app/src/test/java/es/situm/plugin/navigationProgress/NavigationProgressCreator.java +154 -0
- package/src/android/app/src/test/java/es/situm/plugin/poi/PoiCreator.java +126 -0
- package/src/android/app/src/test/java/es/situm/plugin/poiCategory/PoiCategoryCreator.java +38 -0
- package/src/android/app/src/test/java/es/situm/plugin/point/PointCreator.java +200 -0
- package/src/android/app/src/test/java/es/situm/plugin/route/RouteCreator.java +142 -0
- package/src/android/app/src/test/java/es/situm/plugin/routeStep/RouteStepCreator.java +173 -0
- package/src/android/app/src/test/java/es/situm/plugin/situmConversionArea/SitumConversionAreaCreator.java +35 -0
- package/src/android/build.gradle +31 -0
- package/src/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/src/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/src/android/gradle.properties +16 -0
- package/src/android/gradlew +172 -0
- package/src/android/gradlew.bat +84 -0
- package/src/android/settings.gradle +3 -0
- package/src/android/situm.gradle +19 -0
- package/src/ios/Classes/Private/CDVDebug.h +25 -0
- package/src/ios/Classes/Private/CDVJSON_private.h +31 -0
- package/src/ios/Classes/Private/CDVJSON_private.m +99 -0
- package/src/ios/Classes/Private/CDVPlugin+Private.h +24 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVGestureHandler/CDVGestureHandler.h +26 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVGestureHandler/CDVGestureHandler.m +70 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVHandleOpenURL/CDVHandleOpenURL.h +27 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVHandleOpenURL/CDVHandleOpenURL.m +86 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.h +34 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m +153 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVLocalStorage/CDVLocalStorage.h +50 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVLocalStorage/CDVLocalStorage.m +487 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVLogger/CDVLogger.h +26 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVLogger/CDVLogger.m +37 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.h +41 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVUIWebViewEngine/CDVUIWebViewDelegate.m +399 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVUIWebViewEngine/CDVUIWebViewEngine.h +27 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVUIWebViewEngine/CDVUIWebViewEngine.m +202 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.h +29 -0
- package/src/ios/Classes/Private/CDVPlugins/CDVUIWebViewEngine/CDVUIWebViewNavigationDelegate.m +153 -0
- package/src/ios/Classes/Public/CDV.h +32 -0
- package/src/ios/Classes/Public/CDVAppDelegate.h +28 -0
- package/src/ios/Classes/Public/CDVAppDelegate.m +118 -0
- package/src/ios/Classes/Public/CDVAvailability.h +111 -0
- package/src/ios/Classes/Public/CDVAvailabilityDeprecated.h +26 -0
- package/src/ios/Classes/Public/CDVCommandDelegate.h +51 -0
- package/src/ios/Classes/Public/CDVCommandDelegateImpl.h +36 -0
- package/src/ios/Classes/Public/CDVCommandDelegateImpl.m +186 -0
- package/src/ios/Classes/Public/CDVCommandQueue.h +39 -0
- package/src/ios/Classes/Public/CDVCommandQueue.m +194 -0
- package/src/ios/Classes/Public/CDVConfigParser.h +30 -0
- package/src/ios/Classes/Public/CDVConfigParser.m +81 -0
- package/src/ios/Classes/Public/CDVInvokedUrlCommand.h +52 -0
- package/src/ios/Classes/Public/CDVInvokedUrlCommand.m +116 -0
- package/src/ios/Classes/Public/CDVPlugin+Resources.h +39 -0
- package/src/ios/Classes/Public/CDVPlugin+Resources.m +38 -0
- package/src/ios/Classes/Public/CDVPlugin.h +85 -0
- package/src/ios/Classes/Public/CDVPlugin.m +202 -0
- package/src/ios/Classes/Public/CDVPluginResult.h +66 -0
- package/src/ios/Classes/Public/CDVPluginResult.m +186 -0
- package/src/ios/Classes/Public/CDVScreenOrientationDelegate.h +33 -0
- package/src/ios/Classes/Public/CDVTimer.h +27 -0
- package/src/ios/Classes/Public/CDVTimer.m +123 -0
- package/src/ios/Classes/Public/CDVURLProtocol.h +27 -0
- package/src/ios/Classes/Public/CDVURLProtocol.m +113 -0
- package/src/ios/Classes/Public/CDVUserAgentUtil.h +27 -0
- package/src/ios/Classes/Public/CDVUserAgentUtil.m +124 -0
- package/src/ios/Classes/Public/CDVViewController.h +92 -0
- package/src/ios/Classes/Public/CDVViewController.m +821 -0
- package/src/ios/Classes/Public/CDVWebViewEngineProtocol.h +42 -0
- package/src/ios/Classes/Public/CDVWhitelist.h +34 -0
- package/src/ios/Classes/Public/CDVWhitelist.m +285 -0
- package/src/ios/Classes/Public/NSDictionary+CordovaPreferences.h +35 -0
- package/src/ios/Classes/Public/NSDictionary+CordovaPreferences.m +63 -0
- package/src/ios/Classes/Public/NSMutableArray+QueueAdditions.h +29 -0
- package/src/ios/Classes/Public/NSMutableArray+QueueAdditions.m +58 -0
- package/src/ios/Cordova/Cordova.h +51 -0
- package/src/ios/Cordova/Info.plist +24 -0
- package/src/ios/Podfile +5 -0
- package/src/ios/SitumCordovaPlugin.xcodeproj/project.pbxproj +1324 -0
- package/src/ios/SitumCordovaPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/src/ios/SitumCordovaPlugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/src/ios/SitumCordovaPlugin.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- package/src/ios/SitumCordovaPlugin.xcodeproj/xcshareddata/xcschemes/CordovaLib.xcscheme +100 -0
- package/src/ios/SitumCordovaPlugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/src/ios/SitumCordovaPlugin_Prefix.pch +22 -0
- package/src/ios/VERSION +1 -0
- package/src/ios/cordova.js +2432 -0
- package/src/ios/situmcordovaplugin/AppDelegate.h +22 -0
- package/src/ios/situmcordovaplugin/AppDelegate.m +98 -0
- package/src/ios/situmcordovaplugin/Assets.xcassets/AppIcon.appiconset/Contents.json +98 -0
- package/src/ios/situmcordovaplugin/Base.lproj/LaunchScreen.storyboard +25 -0
- package/src/ios/situmcordovaplugin/Base.lproj/Main.storyboard +24 -0
- package/src/ios/situmcordovaplugin/Constants.h +14 -0
- package/src/ios/situmcordovaplugin/Constants.m +14 -0
- package/src/ios/situmcordovaplugin/Info.plist +45 -0
- package/src/ios/situmcordovaplugin/SITUtils.h +7 -0
- package/src/ios/situmcordovaplugin/SITUtils.m +13 -0
- package/src/ios/situmcordovaplugin/SitumLocationWrapper.h +109 -0
- package/src/ios/situmcordovaplugin/SitumLocationWrapper.m +983 -0
- package/src/ios/situmcordovaplugin/SitumPlugin.h +41 -0
- package/src/ios/situmcordovaplugin/SitumPlugin.m +752 -0
- package/src/ios/situmcordovaplugin/ViewController.h +15 -0
- package/src/ios/situmcordovaplugin/ViewController.m +29 -0
- package/src/ios/situmcordovaplugin/main.m +16 -0
- package/src/ios/situmcordovaplugin/situmcordovaplugin.xcdatamodeld/.xccurrentversion +8 -0
- package/src/ios/situmcordovaplugin/situmcordovaplugin.xcdatamodeld/situmcordovaplugin.xcdatamodel/contents +4 -0
- package/src/ios/situmcordovaplugintests/AngleTests.m +53 -0
- package/src/ios/situmcordovaplugintests/BoundTests.m +51 -0
- package/src/ios/situmcordovaplugintests/BuildingTests.m +41 -0
- package/src/ios/situmcordovaplugintests/CartesianCoordinateTests.m +42 -0
- package/src/ios/situmcordovaplugintests/ConversionAreaTests.m +43 -0
- package/src/ios/situmcordovaplugintests/CoordinateTests.m +42 -0
- package/src/ios/situmcordovaplugintests/DimensionTests.m +43 -0
- package/src/ios/situmcordovaplugintests/EventTests.m +42 -0
- package/src/ios/situmcordovaplugintests/FloorTests.m +52 -0
- package/src/ios/situmcordovaplugintests/Info.plist +38 -0
- package/src/ios/situmcordovaplugintests/InputTests/DirectionsRequestTest.m +108 -0
- package/src/ios/situmcordovaplugintests/InputTests/InputCartesianCoordinateTests.m +45 -0
- package/src/ios/situmcordovaplugintests/InputTests/InputCoordinateTests.m +45 -0
- package/src/ios/situmcordovaplugintests/InputTests/InputFloorTests.m +59 -0
- package/src/ios/situmcordovaplugintests/InputTests/InputIndicationTests.m +45 -0
- package/src/ios/situmcordovaplugintests/InputTests/InputLocationTests.m +163 -0
- package/src/ios/situmcordovaplugintests/InputTests/InputPoiCategoryTests.m +46 -0
- package/src/ios/situmcordovaplugintests/InputTests/InputPointTests.m +137 -0
- package/src/ios/situmcordovaplugintests/InputTests/LocationRequestTest.m +79 -0
- package/src/ios/situmcordovaplugintests/LocationStatusTests.m +60 -0
- package/src/ios/situmcordovaplugintests/LocationTests.m +114 -0
- package/src/ios/situmcordovaplugintests/NavigationProgressTests.m +50 -0
- package/src/ios/situmcordovaplugintests/PoiCategoryIconTests.m +43 -0
- package/src/ios/situmcordovaplugintests/PoiCategoryTests.m +42 -0
- package/src/ios/situmcordovaplugintests/PoiTests.m +83 -0
- package/src/ios/situmcordovaplugintests/PointTests.m +107 -0
- package/src/ios/situmcordovaplugintests/RouteStepTests.m +78 -0
- package/src/ios/situmcordovaplugintests/RouteTests.m +42 -0
- package/src/ios/situmcordovaplugintests/SitumCreatorTests.h +91 -0
- package/src/ios/situmcordovaplugintests/SitumCreatorTests.m +928 -0
- package/src/ios/situmcordovaplugintests/TestingHelper.h +48 -0
- package/src/ios/situmcordovaplugintests/TestingHelper.m +342 -0
- package/src/ios/situmcordovaplugintests/indicationTests.m +43 -0
- package/tests/common-resources/angle/angle1.json +6 -0
- package/tests/common-resources/angle/angle2.json +6 -0
- package/tests/common-resources/bounds/bounds1.json +18 -0
- package/tests/common-resources/bounds/bounds2.json +18 -0
- package/tests/common-resources/building/building1.json +64 -0
- package/tests/common-resources/cartesianCoordinate/cartesianCoordinate1.json +4 -0
- package/tests/common-resources/circle/circle1.json +17 -0
- package/tests/common-resources/coordinate/coordinate1.json +4 -0
- package/tests/common-resources/dimensions/dimensions1.json +4 -0
- package/tests/common-resources/directionsRequest/directionsRequest1.json +166 -0
- package/tests/common-resources/directionsRequest/directionsRequest2.json +167 -0
- package/tests/common-resources/directionsRequest/directionsRequest3.json +166 -0
- package/tests/common-resources/directionsRequest/directionsRequest4.json +166 -0
- package/tests/common-resources/directionsRequest/directionsRequest5.json +167 -0
- package/tests/common-resources/directionsRequest/directionsRequest6.json +153 -0
- package/tests/common-resources/events/event1.json +66 -0
- package/tests/common-resources/floor/floor1.json +13 -0
- package/tests/common-resources/floor/floor2.json +13 -0
- package/tests/common-resources/indication/indication1.json +10 -0
- package/tests/common-resources/location/location1.json +48 -0
- package/tests/common-resources/location/location10.json +48 -0
- package/tests/common-resources/location/location2.json +48 -0
- package/tests/common-resources/location/location3.json +48 -0
- package/tests/common-resources/location/location4.json +48 -0
- package/tests/common-resources/location/location5.json +48 -0
- package/tests/common-resources/location/location6.json +48 -0
- package/tests/common-resources/location/location7.json +48 -0
- package/tests/common-resources/location/location8.json +48 -0
- package/tests/common-resources/location/location9.json +48 -0
- package/tests/common-resources/locationRequest/locationRequest1.json +6 -0
- package/tests/common-resources/locationRequest/locationRequest2.json +32 -0
- package/tests/common-resources/locationRequest/locationRequest3.json +33 -0
- package/tests/common-resources/locationRequest/locationRequest4.json +31 -0
- package/tests/common-resources/locationStatus/locationStatus1.json +4 -0
- package/tests/common-resources/locationStatus/locationStatus10.json +4 -0
- package/tests/common-resources/locationStatus/locationStatus11.json +4 -0
- package/tests/common-resources/locationStatus/locationStatus12.json +4 -0
- package/tests/common-resources/locationStatus/locationStatus13.json +4 -0
- package/tests/common-resources/locationStatus/locationStatus2.json +4 -0
- package/tests/common-resources/locationStatus/locationStatus3.json +4 -0
- package/tests/common-resources/locationStatus/locationStatus4.json +4 -0
- package/tests/common-resources/locationStatus/locationStatus5.json +4 -0
- package/tests/common-resources/locationStatus/locationStatus6.json +4 -0
- package/tests/common-resources/locationStatus/locationStatus7.json +4 -0
- package/tests/common-resources/locationStatus/locationStatus8.json +4 -0
- package/tests/common-resources/locationStatus/locationStatus9.json +4 -0
- package/tests/common-resources/navigationProgress/navigationProgress1.json +77 -0
- package/tests/common-resources/navigationProgress/navigationProgress2.json +77 -0
- package/tests/common-resources/poi/poi1.json +35 -0
- package/tests/common-resources/poi/poi2.json +35 -0
- package/tests/common-resources/poi/poi3.json +35 -0
- package/tests/common-resources/poi/poi4.json +38 -0
- package/tests/common-resources/poi/poi5.json +35 -0
- package/tests/common-resources/poiCategory/poiCategory1.json +7 -0
- package/tests/common-resources/poiCategoryIcon/poiCategoryIcon1.json +1 -0
- package/tests/common-resources/poiCategoryIcon/poiCategoryIcon1.png +0 -0
- package/tests/common-resources/point/point1.json +14 -0
- package/tests/common-resources/point/point2.json +14 -0
- package/tests/common-resources/point/point3.json +14 -0
- package/tests/common-resources/point/point4.json +14 -0
- package/tests/common-resources/point/point5.json +14 -0
- package/tests/common-resources/point/point6.json +14 -0
- package/tests/common-resources/point/point7.json +14 -0
- package/tests/common-resources/point/point8.json +14 -0
- package/tests/common-resources/route/route1.json +530 -0
- package/tests/common-resources/routeStep/routeStep1.json +35 -0
- package/tests/common-resources/routeStep/routeStep2.json +35 -0
- package/tests/common-resources/routeStep/routeStep3.json +35 -0
- package/tests/common-resources/routeStep/routeStep4.json +35 -0
- package/tests/common-resources/routeStep/routeStep5.json +35 -0
- package/tests/common-resources/situmConversionArea/situmConversionArea1.json +19 -0
- package/tests/js/resources/fetchBuildings.json +176 -0
- package/tests/js/resources/fetchEventsFromBuilding.json +201 -0
- package/tests/js/resources/fetchFloorsFromBuilding.json +34 -0
- package/tests/js/resources/fetchIndoorPOIsFromBuilding.json +574 -0
- package/tests/js/resources/fetchMapFromFloor.json +3 -0
- package/tests/js/resources/fetchOutdoorPOIsFromBuilding.json +68 -0
- package/tests/js/resources/fetchPoiCategories.json +72 -0
- package/tests/js/resources/fetchPoiCategoryIconNormal.json +3 -0
- package/tests/js/resources/fetchPoiCategoryIconSelected.json +3 -0
- package/tests/js/resources/requestDirections.json +1167 -0
- package/tests/js/resources/startPositioning/0_starting.json +4 -0
- package/tests/js/resources/startPositioning/1_preparingPositioningModel.json +4 -0
- package/tests/js/resources/startPositioning/2_startingPositioning.json +4 -0
- package/tests/js/resources/startPositioning/3_calculating.json +4 -0
- package/tests/js/resources/startPositioning/4_position.json +48 -0
- package/tests/js/resources/startPositioning/5_position.json +48 -0
- package/tests/js/test.js +416 -0
- package/tests/scripts/clean_android_resources.sh +3 -0
- package/tests/scripts/clean_ios_resources.sh +3 -0
- package/tests/scripts/copy_android_resources.sh +3 -0
- package/tests/scripts/copy_ios_resources.sh +3 -0
- package/tests/scripts/self-destruct.sh +1 -0
- package/www/android/Interfaces.js +742 -0
- package/www/android/situm.js +296 -0
- package/www/ios/situm.js +99 -0
- package/www/map-view-controller.js +223 -0
- package/www/map-view.js +88 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"accuracy": 4.978759765625,
|
|
3
|
+
"bearing": {
|
|
4
|
+
"degrees": 377.089663436474,
|
|
5
|
+
"degreesClockwise": -17.089663436473984,
|
|
6
|
+
"radians": 6.5814562022037455,
|
|
7
|
+
"radiansMinusPiPi": 0.29827089502415927
|
|
8
|
+
},
|
|
9
|
+
"bearingQuality": "LOW",
|
|
10
|
+
"buildingIdentifier": "3468",
|
|
11
|
+
"cartesianBearing": {
|
|
12
|
+
"degrees": 242.75607299804685,
|
|
13
|
+
"degreesClockwise": 117.24392700195315,
|
|
14
|
+
"radians": 4.23689275302762,
|
|
15
|
+
"radiansMinusPiPi": -2.0462925541519663
|
|
16
|
+
},
|
|
17
|
+
"cartesianCoordinate": {
|
|
18
|
+
"x": 59.19538879394531,
|
|
19
|
+
"y": 27.70305824279785
|
|
20
|
+
},
|
|
21
|
+
"coordinate": {
|
|
22
|
+
"latitude": 42.87225305601186,
|
|
23
|
+
"longitude": -8.56352392324924
|
|
24
|
+
},
|
|
25
|
+
"floorIdentifier": "5762",
|
|
26
|
+
"position": {
|
|
27
|
+
"buildingIdentifier": "3468",
|
|
28
|
+
"cartesianCoordinate": {
|
|
29
|
+
"x": 59.19538879394531,
|
|
30
|
+
"y": 27.70305824279785
|
|
31
|
+
},
|
|
32
|
+
"coordinate": {
|
|
33
|
+
"latitude": 42.87225305601186,
|
|
34
|
+
"longitude": -8.56352392324924
|
|
35
|
+
},
|
|
36
|
+
"floorIdentifier": "5762",
|
|
37
|
+
"isIndoor": true,
|
|
38
|
+
"isOutdoor": false
|
|
39
|
+
},
|
|
40
|
+
"provider": "SITUM_PROVIDER",
|
|
41
|
+
"quality": "LOW",
|
|
42
|
+
"hasBearing": false,
|
|
43
|
+
"timestamp": 1525334289892,
|
|
44
|
+
"hasCartesianBearing": false,
|
|
45
|
+
"isIndoor": true,
|
|
46
|
+
"isOutdoor": false,
|
|
47
|
+
"deviceId": "168162735961687"
|
|
48
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"accuracy": 4.118940830230713,
|
|
3
|
+
"bearing": {
|
|
4
|
+
"degrees": 380.73318686808227,
|
|
5
|
+
"degreesClockwise": -20.73318686808227,
|
|
6
|
+
"radians": 6.645047682458873,
|
|
7
|
+
"radiansMinusPiPi": 0.3618623752792871
|
|
8
|
+
},
|
|
9
|
+
"bearingQuality": "LOW",
|
|
10
|
+
"buildingIdentifier": "3468",
|
|
11
|
+
"cartesianBearing": {
|
|
12
|
+
"degrees": 239.11254882812497,
|
|
13
|
+
"degreesClockwise": 120.88745117187503,
|
|
14
|
+
"radians": 4.17330125988649,
|
|
15
|
+
"radiansMinusPiPi": -2.1098840472930966
|
|
16
|
+
},
|
|
17
|
+
"cartesianCoordinate": {
|
|
18
|
+
"x": 61.504093170166016,
|
|
19
|
+
"y": 26.361942291259766
|
|
20
|
+
},
|
|
21
|
+
"coordinate": {
|
|
22
|
+
"latitude": 42.87226127534791,
|
|
23
|
+
"longitude": -8.563554629285758
|
|
24
|
+
},
|
|
25
|
+
"floorIdentifier": "5762",
|
|
26
|
+
"position": {
|
|
27
|
+
"buildingIdentifier": "3468",
|
|
28
|
+
"cartesianCoordinate": {
|
|
29
|
+
"x": 61.504093170166016,
|
|
30
|
+
"y": 26.361942291259766
|
|
31
|
+
},
|
|
32
|
+
"coordinate": {
|
|
33
|
+
"latitude": 42.87226127534791,
|
|
34
|
+
"longitude": -8.563554629285758
|
|
35
|
+
},
|
|
36
|
+
"floorIdentifier": "5762",
|
|
37
|
+
"isIndoor": true,
|
|
38
|
+
"isOutdoor": false
|
|
39
|
+
},
|
|
40
|
+
"provider": "SITUM_PROVIDER",
|
|
41
|
+
"quality": "LOW",
|
|
42
|
+
"hasBearing": false,
|
|
43
|
+
"timestamp": 1525334292895,
|
|
44
|
+
"hasCartesianBearing": false,
|
|
45
|
+
"isIndoor": true,
|
|
46
|
+
"isOutdoor": false,
|
|
47
|
+
"deviceId": "168162735961687"
|
|
48
|
+
}
|
package/tests/js/test.js
ADDED
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
const expect = require("expect.js");
|
|
2
|
+
const buildings = require('./resources/fetchBuildings.json');
|
|
3
|
+
const floors = require('./resources/fetchFloorsFromBuilding.json');
|
|
4
|
+
const indoorPois = require('./resources/fetchIndoorPOIsFromBuilding.json');
|
|
5
|
+
const outdoorPois = require('./resources/fetchOutdoorPOIsFromBuilding.json');
|
|
6
|
+
const events = require('./resources/fetchEventsFromBuilding.json');
|
|
7
|
+
const poiCategories = require('./resources/fetchPoiCategories.json');
|
|
8
|
+
const map = require('./resources/fetchMapFromFloor.json');
|
|
9
|
+
const iconNormal = require('./resources/fetchPoiCategoryIconNormal.json');
|
|
10
|
+
const iconSelected = require('./resources/fetchPoiCategoryIconSelected.json');
|
|
11
|
+
const route = require('./resources/requestDirections.json');
|
|
12
|
+
const starting = require('./resources/startPositioning/0_starting.json');
|
|
13
|
+
const preparePositioningModel = require('./resources/startPositioning/1_preparingPositioningModel.json');
|
|
14
|
+
const startingPositioning = require('./resources/startPositioning/2_startingPositioning.json');
|
|
15
|
+
const calculating = require('./resources/startPositioning/3_calculating.json');
|
|
16
|
+
const position = require('./resources/startPositioning/4_position.json');
|
|
17
|
+
let building, floor, indoorPoi, outdoorPoi, event, poiCategory, edge, indication, node, point, step;
|
|
18
|
+
|
|
19
|
+
describe('Test fetchBuildings -> ', () => {
|
|
20
|
+
it('Check reutrned value', () => {
|
|
21
|
+
expect(buildings).to.be.ok();
|
|
22
|
+
expect(buildings instanceof Array).to.be(true);
|
|
23
|
+
});
|
|
24
|
+
it('Check building', () => {
|
|
25
|
+
expect(building = buildings[0]);
|
|
26
|
+
expect(typeof building).to.be('object');
|
|
27
|
+
expect(typeof building.address).to.be('string');
|
|
28
|
+
expect(typeof building.bounds).to.be('object');
|
|
29
|
+
expect(typeof building.boundsRotated).to.be('object');
|
|
30
|
+
expect(typeof building.center).to.be('object');
|
|
31
|
+
expect(typeof building.dimensions).to.be('object');
|
|
32
|
+
expect(typeof building.infoHtml).to.be('string');
|
|
33
|
+
expect(typeof building.name).to.be('string');
|
|
34
|
+
expect(typeof building.pictureThumbUrl).to.be('string');
|
|
35
|
+
expect(typeof building.pictureUrl).to.be('string');
|
|
36
|
+
expect(typeof building.rotation).to.be('number');
|
|
37
|
+
expect(typeof building.userIdentifier).to.be('string');
|
|
38
|
+
expect(typeof building.buildingIdentifier).to.be('string');
|
|
39
|
+
expect(typeof building.customFields).to.be('object');
|
|
40
|
+
});
|
|
41
|
+
it('Check building bounds', () => {
|
|
42
|
+
testBounds(building.bounds);
|
|
43
|
+
});
|
|
44
|
+
it('Check building boundsRotated', () => {
|
|
45
|
+
testBounds(building.boundsRotated);
|
|
46
|
+
});
|
|
47
|
+
it('Check building center', () => {
|
|
48
|
+
testCoordinate(building.center);
|
|
49
|
+
});
|
|
50
|
+
it('Check building dimensions', () => {
|
|
51
|
+
testDimension(building.dimensions);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
describe('Test fetchFloorsFromBuilding ->', () => {
|
|
56
|
+
it('Check returned value', () => {
|
|
57
|
+
expect(floors).to.be.ok();
|
|
58
|
+
expect(floors instanceof Array).to.be(true);
|
|
59
|
+
});
|
|
60
|
+
it('Check floor', () => {
|
|
61
|
+
expect(floor = floors[0]);
|
|
62
|
+
expect(typeof floor).to.be('object');
|
|
63
|
+
expect(typeof floor.altitude).to.be('number');
|
|
64
|
+
expect(typeof floor.buildingIdentifier).to.be('string');
|
|
65
|
+
expect(typeof floor.level).to.be('number');
|
|
66
|
+
expect(typeof floor.mapUrl).to.be('string');
|
|
67
|
+
expect(typeof floor.scale).to.be('number');
|
|
68
|
+
expect(typeof floor.floorIdentifier).to.be('string');
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
describe('Test fetchIndoorPOIsFromBuilding ->', () => {
|
|
73
|
+
it('Check returned value', () => {
|
|
74
|
+
expect(indoorPois).to.be.ok();
|
|
75
|
+
expect(indoorPois instanceof Array).to.be(true);
|
|
76
|
+
});
|
|
77
|
+
it('Check indoorPOI', () => {
|
|
78
|
+
expect(indoorPoi = indoorPois[0]);
|
|
79
|
+
expect(typeof indoorPoi).to.be('object');
|
|
80
|
+
expect(typeof indoorPoi.identifier).to.be('string');
|
|
81
|
+
expect(typeof indoorPoi.buildingIdentifier).to.be('string');
|
|
82
|
+
expect(typeof indoorPoi.cartesianCoordinate).to.be('object');
|
|
83
|
+
expect(typeof indoorPoi.coordinate).to.be('object');
|
|
84
|
+
expect(typeof indoorPoi.floorIdentifier).to.be('string');
|
|
85
|
+
expect(typeof indoorPoi.poiName).to.be('string');
|
|
86
|
+
expect(typeof indoorPoi.position).to.be('object');
|
|
87
|
+
expect(typeof indoorPoi.isIndoor).to.be('boolean');
|
|
88
|
+
expect(typeof indoorPoi.isOutdoor).to.be('boolean');
|
|
89
|
+
expect(typeof indoorPoi.category).to.be('string');
|
|
90
|
+
expect(typeof indoorPoi.infoHtml).to.be('string');
|
|
91
|
+
expect(typeof indoorPoi.customFields).to.be('object');
|
|
92
|
+
});
|
|
93
|
+
it('Check indoorPOI cartesiansCoordinate', () => {
|
|
94
|
+
testCartesianCoordinate(indoorPoi.cartesianCoordinate);
|
|
95
|
+
});
|
|
96
|
+
it('Check indoorPOI coordinate', () => {
|
|
97
|
+
testCoordinate(indoorPoi.coordinate);
|
|
98
|
+
});
|
|
99
|
+
it('Check indoorPOI position', () => {
|
|
100
|
+
testPoint(indoorPoi.position)
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
describe('Test fetchOutdoorPOIsFromBuilding ->', () => {
|
|
104
|
+
it('Check returned value', () => {
|
|
105
|
+
expect(outdoorPois).to.be.ok();
|
|
106
|
+
expect(outdoorPois instanceof Array).to.be(true);
|
|
107
|
+
});
|
|
108
|
+
it('Check outdoorPOI', () => {
|
|
109
|
+
expect(outdoorPoi = outdoorPois[0]);
|
|
110
|
+
expect(typeof outdoorPoi).to.be('object');
|
|
111
|
+
expect(typeof outdoorPoi.identifier).to.be('string');
|
|
112
|
+
expect(typeof outdoorPoi.buildingIdentifier).to.be('string');
|
|
113
|
+
expect(typeof outdoorPoi.cartesianCoordinate).to.be('object');
|
|
114
|
+
expect(typeof outdoorPoi.coordinate).to.be('object');
|
|
115
|
+
expect(typeof outdoorPoi.floorIdentifier).to.be('string');
|
|
116
|
+
expect(typeof outdoorPoi.poiName).to.be('string');
|
|
117
|
+
expect(typeof outdoorPoi.position).to.be('object');
|
|
118
|
+
expect(typeof outdoorPoi.isIndoor).to.be('boolean');
|
|
119
|
+
expect(typeof outdoorPoi.isOutdoor).to.be('boolean');
|
|
120
|
+
expect(typeof outdoorPoi.category).to.be('string');
|
|
121
|
+
expect(typeof outdoorPoi.infoHtml).to.be('string');
|
|
122
|
+
expect(typeof outdoorPoi.customFields).to.be('object');
|
|
123
|
+
});
|
|
124
|
+
it('Check outdoorPOI cartesiansCoordinate', () => {
|
|
125
|
+
testCartesianCoordinate(outdoorPoi.cartesianCoordinate);
|
|
126
|
+
});
|
|
127
|
+
it('Check outdoorPOI coordinate', () => {
|
|
128
|
+
testCoordinate(outdoorPoi.coordinate);
|
|
129
|
+
});
|
|
130
|
+
it('Check outdoorPOI position', () => {
|
|
131
|
+
testPoint(outdoorPoi.position);
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
describe('Test fetchEventsFromBuilding ->', () => {
|
|
135
|
+
it('Check returned value', () => {
|
|
136
|
+
expect(events).to.be.ok();
|
|
137
|
+
expect(events instanceof Array).to.be(true);
|
|
138
|
+
});
|
|
139
|
+
it('Check event', () => {
|
|
140
|
+
expect(event = events[0]);
|
|
141
|
+
expect(typeof event).to.be('object');
|
|
142
|
+
expect(typeof event.buildingIdentifier).to.be('number');
|
|
143
|
+
expect(typeof event.identifier).to.be('number');
|
|
144
|
+
expect(typeof event.floorIdentifier).to.be('number');
|
|
145
|
+
expect(typeof event.infoHtml).to.be('string');
|
|
146
|
+
expect(typeof event.conversionArea).to.be('object');
|
|
147
|
+
expect(typeof event.customFields).to.be('object');
|
|
148
|
+
expect(typeof event.radius).to.be('number');
|
|
149
|
+
expect(typeof event.x).to.be('number');
|
|
150
|
+
expect(typeof event.y).to.be('number');
|
|
151
|
+
expect(typeof event.name).to.be('string');
|
|
152
|
+
expect(typeof event.trigger).to.be('object');
|
|
153
|
+
expect(typeof event.conversion).to.be('object');
|
|
154
|
+
});
|
|
155
|
+
it('Check event conversionArea', () => {
|
|
156
|
+
testConversionArea(event.conversionArea);
|
|
157
|
+
});
|
|
158
|
+
it('Check event conversion', () => {
|
|
159
|
+
testCircle(event.conversion);
|
|
160
|
+
});
|
|
161
|
+
it('Check event trigger', () => {
|
|
162
|
+
testCircle(event.trigger);
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
describe('Test fetchPoiCategories ->', () => {
|
|
166
|
+
it('Check returned value', () => {
|
|
167
|
+
expect(poiCategories).to.be.ok();
|
|
168
|
+
expect(poiCategories instanceof Array).to.be(true);
|
|
169
|
+
});
|
|
170
|
+
it('Check POICategory', () => {
|
|
171
|
+
expect(poiCategory = poiCategories[0]);
|
|
172
|
+
expect(typeof poiCategory).to.be('object');
|
|
173
|
+
expect(typeof poiCategory.poiCategoryCode).to.be('string');
|
|
174
|
+
expect(typeof poiCategory.poiCategoryName).to.be('string');
|
|
175
|
+
expect(typeof poiCategory.icon_selected).to.be('string');
|
|
176
|
+
expect(typeof poiCategory.icon_unselected).to.be('string');
|
|
177
|
+
expect(typeof poiCategory.public).to.be('boolean');
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
describe('Test fetchMapFromFloor ->', () => {
|
|
181
|
+
it('Check map', () => {
|
|
182
|
+
expect(map).to.be.ok();
|
|
183
|
+
expect(typeof map.data).to.be('string');
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
describe('Test fetchPoiCategoryIconNormal ->', () => {
|
|
187
|
+
it('Check iconNormal', () => {
|
|
188
|
+
expect(iconNormal).to.be.ok();
|
|
189
|
+
expect(typeof iconNormal.data).to.be('string')
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
describe('Test fetchPoiCategoryIconSelected ->', () => {
|
|
193
|
+
it('Chek iconSelected', () => {
|
|
194
|
+
expect(iconSelected).to.be.ok();
|
|
195
|
+
expect(typeof iconSelected.data).to.be('string');
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
describe('Test requestDirections ->', () => {
|
|
199
|
+
it('Check returned value', () => {
|
|
200
|
+
expect(route).to.be.ok();
|
|
201
|
+
expect(typeof route).to.be('object');
|
|
202
|
+
});
|
|
203
|
+
it('Check route', () => {
|
|
204
|
+
expect(route.edges instanceof Array).to.be(true);
|
|
205
|
+
expect(typeof route.firstStep).to.be('object');
|
|
206
|
+
expect(typeof route.from).to.be('object');
|
|
207
|
+
expect(route.indications instanceof Array).to.be(true);
|
|
208
|
+
expect(typeof route.lastStep).to.be('object');
|
|
209
|
+
expect(route.nodes instanceof Array).to.be(true);
|
|
210
|
+
expect(route.points instanceof Array).to.be(true);
|
|
211
|
+
expect(route.segments instanceof Array).to.be(true);
|
|
212
|
+
expect(typeof route.TO).to.be('object');
|
|
213
|
+
expect(route.steps instanceof Array).to.be(true);
|
|
214
|
+
});
|
|
215
|
+
it('Check edge route', () => {
|
|
216
|
+
expect(edge = route.edges[0]);
|
|
217
|
+
expect(typeof edge).to.be('object');
|
|
218
|
+
testRouteStep(edge);
|
|
219
|
+
});
|
|
220
|
+
it('Check firstStep route', () => {
|
|
221
|
+
testRouteStep(route.firstStep);
|
|
222
|
+
});
|
|
223
|
+
it('Check from route', () => {
|
|
224
|
+
testPoint(route.from);
|
|
225
|
+
});
|
|
226
|
+
it('Check indication route', () => {
|
|
227
|
+
expect(indication = route.indications[0]);
|
|
228
|
+
expect(typeof indication).to.be('object');
|
|
229
|
+
testIndication(indication);
|
|
230
|
+
});
|
|
231
|
+
it('Check lastStep route', () => {
|
|
232
|
+
testRouteStep(route.lastStep);
|
|
233
|
+
});
|
|
234
|
+
it('Check node route', () => {
|
|
235
|
+
expect(node = route.nodes[0]);
|
|
236
|
+
expect(typeof node).to.be('object');
|
|
237
|
+
testPoint(node);
|
|
238
|
+
});
|
|
239
|
+
it('Check point route', () => {
|
|
240
|
+
expect(point = route.points[0]);
|
|
241
|
+
expect(typeof point).to.be('object');
|
|
242
|
+
testPoint(point);
|
|
243
|
+
});
|
|
244
|
+
it('Check segment route', () => {
|
|
245
|
+
expect(segment = route.segments[0]);
|
|
246
|
+
expect(typeof segment).to.be('object');
|
|
247
|
+
testSegment(segment);
|
|
248
|
+
});
|
|
249
|
+
it('Check TO route', () => {
|
|
250
|
+
testPoint(route.TO);
|
|
251
|
+
});
|
|
252
|
+
it('Check step route', () => {
|
|
253
|
+
expect(step = route.steps[0]);
|
|
254
|
+
expect(typeof step).to.be('object');
|
|
255
|
+
testRouteStep(step);
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
describe('Test startPositioning ->', () => {
|
|
259
|
+
it('Check returned value', () => {
|
|
260
|
+
expect(starting).to.be.ok();
|
|
261
|
+
expect(typeof starting).to.be('object');
|
|
262
|
+
});
|
|
263
|
+
it('Check starting', () => {
|
|
264
|
+
expect(typeof starting.statusName).to.be('string');
|
|
265
|
+
expect(typeof starting.statusOrdinal).to.be('number');
|
|
266
|
+
})
|
|
267
|
+
it('Check returned value', () => {
|
|
268
|
+
expect(preparePositioningModel).to.be.ok();
|
|
269
|
+
expect(typeof preparePositioningModel).to.be('object');
|
|
270
|
+
});
|
|
271
|
+
it('Check preparePositioningModel', () => {
|
|
272
|
+
expect(typeof preparePositioningModel.statusName).to.be('string');
|
|
273
|
+
expect(typeof preparePositioningModel.statusOrdinal).to.be('number');
|
|
274
|
+
});
|
|
275
|
+
it('Check returned value', () => {
|
|
276
|
+
expect(startingPositioning).to.be.ok();
|
|
277
|
+
expect(typeof startingPositioning).to.be('object');
|
|
278
|
+
});
|
|
279
|
+
it('Check startingPositioning', () => {
|
|
280
|
+
expect(typeof startingPositioning.statusName).to.be('string');
|
|
281
|
+
expect(typeof startingPositioning.statusOrdinal).to.be('number');
|
|
282
|
+
});
|
|
283
|
+
it('Check returned value', () => {
|
|
284
|
+
expect(calculating).to.be.ok();
|
|
285
|
+
expect(typeof calculating).to.be('object');
|
|
286
|
+
});
|
|
287
|
+
it('Check calculating', () => {
|
|
288
|
+
expect(typeof calculating.statusName).to.be('string');
|
|
289
|
+
expect(typeof calculating.statusOrdinal).to.be('number');
|
|
290
|
+
});
|
|
291
|
+
it('Check returned value', () => {
|
|
292
|
+
expect(position).to.be.ok();
|
|
293
|
+
expect(typeof position).to.be('object');
|
|
294
|
+
});
|
|
295
|
+
it('Check position', () => {
|
|
296
|
+
expect(typeof position.accuracy).to.be('number');
|
|
297
|
+
expect(typeof position.bearing).to.be('object');
|
|
298
|
+
expect(typeof position.bearingQuality).to.be('string');
|
|
299
|
+
expect(typeof position.buildingIdentifier).to.be('string');
|
|
300
|
+
expect(typeof position.cartesianBearing).to.be('object');
|
|
301
|
+
expect(typeof position.cartesianCoordinate).to.be('object');
|
|
302
|
+
expect(typeof position.coordinate).to.be('object');
|
|
303
|
+
expect(typeof position.floorIdentifier).to.be('string');
|
|
304
|
+
expect(typeof position.position).to.be('object');
|
|
305
|
+
expect(typeof position.provider).to.be('string');
|
|
306
|
+
expect(typeof position.quality).to.be('string');
|
|
307
|
+
expect(typeof position.hasBearing).to.be('boolean');
|
|
308
|
+
expect(typeof position.timestamp).to.be('number');
|
|
309
|
+
expect(typeof position.hasCartesianBearing).to.be('boolean');
|
|
310
|
+
expect(typeof position.isIndoor).to.be('boolean');
|
|
311
|
+
expect(typeof position.isOutdoor).to.be('boolean');
|
|
312
|
+
expect(typeof position.deviceId).to.be('string');
|
|
313
|
+
});
|
|
314
|
+
it('Check position bearing', () => {
|
|
315
|
+
testBearing(position.bearing);
|
|
316
|
+
});
|
|
317
|
+
it('Check position cartesianBearing', () => {
|
|
318
|
+
testBearing(position.cartesianBearing);
|
|
319
|
+
});
|
|
320
|
+
it('Check position cartesianCoordinate', () => {
|
|
321
|
+
testCartesianCoordinate(position.cartesianCoordinate);
|
|
322
|
+
});
|
|
323
|
+
it('Check position coordinate', () => {
|
|
324
|
+
testCoordinate(position.coordinate);
|
|
325
|
+
});
|
|
326
|
+
it('Check position position', () => {
|
|
327
|
+
testPoint(position.position);
|
|
328
|
+
});
|
|
329
|
+
})
|
|
330
|
+
|
|
331
|
+
const testBounds = bounds => {
|
|
332
|
+
expect(typeof bounds.northEast).to.be('object');
|
|
333
|
+
expect(typeof bounds.northWest).to.be('object');
|
|
334
|
+
expect(typeof bounds.southEast).to.be('object');
|
|
335
|
+
expect(typeof bounds.southWest).to.be('object');
|
|
336
|
+
testCoordinate(bounds.northEast);
|
|
337
|
+
testCoordinate(bounds.northWest);
|
|
338
|
+
testCoordinate(bounds.southEast);
|
|
339
|
+
testCoordinate(bounds.southWest);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
const testCoordinate = coordinate => {
|
|
343
|
+
expect(typeof coordinate.latitude).to.be('number');
|
|
344
|
+
expect(typeof coordinate.longitude).to.be('number');
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
const testDimension = dimension => {
|
|
348
|
+
expect(typeof dimension.width).to.be('number');
|
|
349
|
+
expect(typeof dimension.height).to.be('number');
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
const testCartesianCoordinate = cartesianCoordinate => {
|
|
353
|
+
expect(typeof cartesianCoordinate.x).to.be('number');
|
|
354
|
+
expect(typeof cartesianCoordinate.y).to.be('number');
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
const testPoint = point => {
|
|
358
|
+
expect(typeof point.buildingIdentifier).to.be('string');
|
|
359
|
+
expect(typeof point.cartesianCoordinate).to.be('object');
|
|
360
|
+
expect(typeof point.coordinate).to.be('object');
|
|
361
|
+
expect(typeof point.floorIdentifier).to.be('string');
|
|
362
|
+
expect(typeof point.isIndoor).to.be('boolean');
|
|
363
|
+
expect(typeof point.isOutdoor).to.be('boolean');
|
|
364
|
+
testCartesianCoordinate(point.cartesianCoordinate);
|
|
365
|
+
testCoordinate(point.coordinate);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
const testConversionArea = conversionArea => {
|
|
369
|
+
expect(typeof conversionArea.floorIdentifier).to.be('number');
|
|
370
|
+
expect(typeof conversionArea.topLeft).to.be('string');
|
|
371
|
+
expect(typeof conversionArea.topRight).to.be('string');
|
|
372
|
+
expect(typeof conversionArea.bottomLeft).to.be('string');
|
|
373
|
+
expect(typeof conversionArea.bottomRight).to.be('string');
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
const testCircle = circle => {
|
|
377
|
+
expect(typeof circle.radius).to.be('number');
|
|
378
|
+
expect(typeof circle.center).to.be('object');
|
|
379
|
+
testPoint(circle.center);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
const testRouteStep = routeStep => {
|
|
383
|
+
expect(typeof routeStep.distance).to.be('number');
|
|
384
|
+
expect(typeof routeStep.distanceToGoal).to.be('number');
|
|
385
|
+
expect(typeof routeStep.from).to.be('object');
|
|
386
|
+
expect(typeof routeStep.id).to.be('number');
|
|
387
|
+
expect(typeof routeStep.TO).to.be('object');
|
|
388
|
+
expect(typeof routeStep.isFirst).to.be('boolean');
|
|
389
|
+
expect(typeof routeStep.isLast).to.be('boolean');
|
|
390
|
+
testPoint(routeStep.from);
|
|
391
|
+
testPoint(routeStep.TO);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
const testIndication = indication => {
|
|
395
|
+
expect(typeof indication.distance).to.be('number');
|
|
396
|
+
expect(typeof indication.distanceToNextLevel).to.be('number');
|
|
397
|
+
expect(typeof indication.indicationType).to.be('string');
|
|
398
|
+
expect(typeof indication.orientation).to.be('number');
|
|
399
|
+
expect(typeof indication.orientationType).to.be('string');
|
|
400
|
+
expect(typeof indication.stepIdxDestination).to.be('number');
|
|
401
|
+
expect(typeof indication.stepIdxOrigin).to.be('number');
|
|
402
|
+
expect(typeof indication.neededLevelChange).to.be('boolean');
|
|
403
|
+
expect(typeof indication.humanReadableMessage).to.be('string');
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
const testSegment = segment => {
|
|
407
|
+
expect(typeof segment.floorIdentifier).to.be('string');
|
|
408
|
+
expect(segment.points instanceof Array).to.be(true);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
const testBearing = bearing => {
|
|
412
|
+
expect(typeof bearing.degrees).to.be('number');
|
|
413
|
+
expect(typeof bearing.degreesClockwise).to.be('number');
|
|
414
|
+
expect(typeof bearing.radians).to.be('number');
|
|
415
|
+
expect(typeof bearing.radiansMinusPiPi).to.be('number');
|
|
416
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
rm -rf *
|