xushiting 4 years ago
parent
commit
9a381e2c52
2 changed files with 22 additions and 11 deletions
  1. 14 3
      IndoorViewerAPI.js
  2. 8 8
      api/tiled_maps

+ 14 - 3
IndoorViewerAPI.js

@@ -52896,6 +52896,7 @@ and limitations under the License.
                 'api/license',
                 'api/user',
                 'api/users',
+                'api/route',
                 //'status/health',
                 //'api/configs',
                 'api/poi_type_groups',
@@ -76228,7 +76229,7 @@ and limitations under the License.
         }
         ,
         t.convertPoiEntityToUrlReference = function(t) {
-            return t.isLocationAsPoi ? t.globalLocation.toArray().toString() : t.id.toString()
+            return t.isLocationAsPoi ? t.globalLocation.toArray().toString() : t.id.toString();
         }
         ,
         t.prototype.generatePointCloudViewUrl = function() {
@@ -93641,7 +93642,8 @@ and limitations under the License.
             var t = this;
             this.clearSearchResults(),
             this.PoiService.routeStart && this.PoiService.routeEnd && (this.UrlService.addRouteParameters(this.PoiService.routeStart, this.PoiService.routeEnd),
-            this.RouteService.findRoute(this.PoiService.routeStart.globalLocation, this.PoiService.routeEnd.globalLocation).then((function(e) {
+            //this.RouteService.findRoute(this.PoiService.routeStart.globalLocation, this.PoiService.routeEnd.globalLocation).then((function(e) {
+            this.RouteService.findRoute(this.PoiService.routeStart.location, this.PoiService.routeEnd.location).then((function(e) {
                 t.PoiService.wasRouteFound = e.instructions.length > 0,
                 t.PoiService.poisChanged.emit(),
                 s.isMobileBrowser() && r.blurActiveElement()
@@ -100980,7 +100982,16 @@ and limitations under the License.
                     return t instanceof u.TiledMapOpenStreetMap
                 }
                 ));
-                "osm" === t.factory.ConfigService.getString(f.Configs.CORE_MAP_BASEMAP) ? e || t.addMap(new u.TiledMapOpenStreetMap(t.factory.TransformService,t.factory.ConfigService.getString(f.Configs.CORE_MAP_TILE_URL),t.factory.ConfigService.getInteger(f.Configs.CORE_MAP_TILE_MAX_ZOOM, 25),t,t.tileColor,t.factory.ConfigService.getString(f.Configs.CORE_MAP_ATTRIBUTION))) : t.removeMap(e)
+
+                if("osm" === t.factory.ConfigService.getString(f.Configs.CORE_MAP_BASEMAP)){
+                    if(!e){
+                        t.addMap(new u.TiledMapOpenStreetMap(t.factory.TransformService,t.factory.ConfigService.getString(f.Configs.CORE_MAP_TILE_URL),t.factory.ConfigService.getInteger(f.Configs.CORE_MAP_TILE_MAX_ZOOM, 25),t,t.tileColor,t.factory.ConfigService.getString(f.Configs.CORE_MAP_ATTRIBUTION)));
+                    }
+                }
+                else{
+                    t.removeMap(e);
+                }
+                //"osm" === t.factory.ConfigService.getString(f.Configs.CORE_MAP_BASEMAP) ? e || t.addMap(new u.TiledMapOpenStreetMap(t.factory.TransformService,t.factory.ConfigService.getString(f.Configs.CORE_MAP_TILE_URL),t.factory.ConfigService.getInteger(f.Configs.CORE_MAP_TILE_MAX_ZOOM, 25),t,t.tileColor,t.factory.ConfigService.getString(f.Configs.CORE_MAP_ATTRIBUTION))) : t.removeMap(e)
             }
             )).catch(m.handleWarning)
         }

+ 8 - 8
api/tiled_maps

@@ -1,14 +1,14 @@
 [{
-	"id": 5,
-	"location": [113.595720550921,22.3667041206242, 0.5987030136375425],
-	"orientation": [0.6497313898579827, 0.0, 0.0, 0.7601638777482221],
+	"bundle_id": 3,
 	"file_path": "data/bundle_e67bb877-9674-4549-b6c6-5edf049a8ef5/building_1/map_tiles/2",
 	"file_name": "$DEPTH/$X/$Y.png",
-	"type": "TILED_PYRAMID",
+	"floor_id": 11,
+	"id": 5,
 	"map_size_m": 61.44,
-	"tile_size_px": 256,
-	"max_depth": 3,
+	"max_depth": 13,
 	"quadtree": "fccf7fffcff3bf7f",
-	"floor_id": 2,
-	"bundle_id": 3
+	"location": [113.595720550921,22.3667041206242, 0.5987030136375425],
+	"orientation": [-0.6497313898579827, 0.0, 0.0, 0.7601638777482221],
+	"tile_size_px": 256,
+	"type": "TILED_PYRAMID"
 }]