Skip to content

Commit 2ef908a

Browse files
committedMay 6, 2019
Change strucutre to have one compilable config file
1 parent d3e1a45 commit 2ef908a

File tree

2 files changed

+30
-19
lines changed

2 files changed

+30
-19
lines changed
 

‎index.html

+5-19
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@
3333
</div>
3434
<script>require([
3535
"app/BSLDemo",
36-
"app/sections/HomeSection",
37-
"app/sections/SurroundingsSection",
38-
"app/sections/FloorsSection",
36+
"app/config"
3937
],
4038
(
4139
BSLDemo,
@@ -55,9 +53,9 @@
5553
mapContainer: "mainViewDiv",
5654

5755
// The id to the scene for the BSL you'd like to display:
58-
websceneId: "b753b2ba04ef477ca46a5b8bd9766d2d",
59-
buildingLayerTitle: "Turanga Library",
60-
surroundingsLayerTitle: "City Model Christchurch",
56+
websceneId: config.websceneId,
57+
buildingLayerTitle: config.buildingLayerTitle,
58+
surroundingsLayerTitle: config.surroundingsLayerTitle,
6159

6260
// The url to a SceneService displaying the surrounding:
6361
// surroundingsLayer: "https://services.arcgis.com/hLRlshaEMEYQG5A8/arcgis/rest/services/Scenechch_WSL1/SceneServer",
@@ -67,19 +65,7 @@
6765
// "https://services.arcgis.com/hLRlshaEMEYQG5A8/arcgis/rest/services/Scenechch_WSL1/SceneServer",
6866

6967
// Your different sections:
70-
sections: [
71-
// Check the different files
72-
// to adapt to your need
73-
// or create a new section by
74-
// implement a subclass from `Section`
75-
76-
// The about Tarangua section:
77-
new HomeSection(),
78-
// The different floors:
79-
new FloorsSection(),
80-
// Surroundings:
81-
new SurroundingsSection()
82-
]
68+
sections: config.sections
8369
}, "appDiv");
8470
});</script>
8571
</body>

‎src/config.tsx

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/// <amd-dependency path="esri/core/tsSupport/declareExtendsHelper" name="__extends" />
2+
/// <amd-dependency path="esri/core/tsSupport/decorateHelper" name="__decorate" />
3+
4+
import HomeSection = require("./sections/HomeSection");
5+
import FloorsSection = require("./sections/FloorsSection");
6+
import SurroundingsSection = require("./sections/SurroundingsSection");
7+
8+
export const websceneId = "b753b2ba04ef477ca46a5b8bd9766d2d";
9+
10+
export const sections = [
11+
// Check the different files
12+
// to adapt to your need
13+
// or create a new section by
14+
// implement a subclass from `Section`
15+
16+
// The about Tarangua section:
17+
new HomeSection(),
18+
// The different floors:
19+
new FloorsSection(),
20+
// Surroundings:
21+
new SurroundingsSection()
22+
];
23+
24+
export const surroundingsLayerTitle = "City Model Christchurch";
25+
export const buildingLayerTitle = "Turanga Library";

0 commit comments

Comments
 (0)