Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
IN-SOURCE
Gowanus-CityGML-Viewer
Commits
f0f1d345
Commit
f0f1d345
authored
4 years ago
by
Rushikesh Padsala
Browse files
Options
Download
Email Patches
Plain Diff
changed default basemap and camera view App.js
parent
160d6515
Pipeline
#1297
passed with stage
in 2 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/Source/App.js
+25
-9
public/Source/App.js
with
25 additions
and
9 deletions
+25
-9
public/Source/App.js
+
25
-
9
View file @
f0f1d345
...
@@ -11,13 +11,16 @@
...
@@ -11,13 +11,16 @@
animation
:
false
,
animation
:
false
,
shadow
:
false
,
shadow
:
false
,
// // Set default basemap
// // Set default basemap
imageryProvider
:
new
Cesium
.
MapboxImageryProvider
({
imageryProvider
:
new
Cesium
.
BingMapsImageryProvider
({
mapId
:
'
mapbox.streets
'
url
:
'
https://dev.virtualearth.net
'
,
key
:
'
ArfoC16LZfs9KzyU-OJyXSqVI6a9-Swv-cq7oO6e2bWYqZOS8M77coukVzeYDyLA
'
,
mapStyle
:
Cesium
.
BingMapsStyle
.
AERIAL
}),
}),
baseLayerPicker
:
true
baseLayerPicker
:
true
});
});
viewer
.
clock
.
shouldAnimate
=
false
;
viewer
.
clock
.
shouldAnimate
=
false
;
viewer
.
scene
.
globe
.
enableLighting
=
false
;
viewer
.
clock
.
startTime
=
Cesium
.
JulianDate
.
fromIso8601
(
"
2019-09-20T13:00:00Z
"
);
viewer
.
clock
.
startTime
=
Cesium
.
JulianDate
.
fromIso8601
(
"
2019-09-20T13:00:00Z
"
);
viewer
.
clock
.
stopTime
=
Cesium
.
JulianDate
.
fromIso8601
(
"
2019-09-20T13:20:00Z
"
);
viewer
.
clock
.
stopTime
=
Cesium
.
JulianDate
.
fromIso8601
(
"
2019-09-20T13:20:00Z
"
);
viewer
.
clock
.
currentTime
=
Cesium
.
JulianDate
.
fromIso8601
(
"
2019-09-20T13:00:00Z
"
);
viewer
.
clock
.
currentTime
=
Cesium
.
JulianDate
.
fromIso8601
(
"
2019-09-20T13:00:00Z
"
);
...
@@ -27,23 +30,36 @@
...
@@ -27,23 +30,36 @@
// Configuring the camera
// Configuring the camera
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
// // Create an initial camera view
// // Create an initial camera view
var
initialPosition
=
Cesium
.
Rectangle
.
fromDegrees
(
-
73.99
07
,
40.6
776
,
-
73.9856
,
40.6809
);
var
initialPosition
=
Cesium
.
Cartesian3
.
fromDegrees
(
-
73.99
3092
,
40.6
55215
,
600
);
//
var initialOrientation = new Cesium.HeadingPitchRoll.fromDegrees(
1.0820674827650922, -0.6183562882750495, 0.003599879447971688
);
var
initialOrientation
=
new
Cesium
.
HeadingPitchRoll
.
fromDegrees
(
354
,
-
20
,
0
);
var
homeCameraView
=
{
var
homeCameraView
=
{
destination
:
initialPosition
destination
:
initialPosition
,
//orientation : initialOrientation,
orientation
:
{
//endTransform: Cesium.Matrix4.IDENTITY
heading
:
initialOrientation
.
heading
,
pitch
:
initialOrientation
.
pitch
,
roll
:
initialOrientation
.
roll
}
};
};
// // Set the initial view
// // Set the initial view
viewer
.
scene
.
camera
.
setView
(
homeCameraView
);
viewer
.
scene
.
camera
.
setView
(
homeCameraView
);
console
.
log
(
Cesium
.
Rectangle
.
fromDegrees
);
// set home button to initial view
// set home button to initial view
viewer
.
homeButton
.
viewModel
.
command
.
beforeExecute
.
addEventListener
(
function
(
e
)
{
viewer
.
homeButton
.
viewModel
.
command
.
beforeExecute
.
addEventListener
(
function
(
e
)
{
e
.
cancel
=
true
;
e
.
cancel
=
true
;
viewer
.
scene
.
camera
.
flyTo
(
homeCameraView
);
viewer
.
scene
.
camera
.
flyTo
(
homeCameraView
);
});
});
console
.
log
(
viewer
.
scene
.
camera
);
viewer
.
camera
.
changed
.
addEventListener
(
function
()
{
var
deg
=
Math
.
round
(
Cesium
.
Math
.
toDegrees
(
viewer
.
camera
.
heading
))
console
.
log
(
'
Heading:
'
,
deg
)
var
deg
=
Math
.
round
(
Cesium
.
Math
.
toDegrees
(
viewer
.
camera
.
pitch
))
console
.
log
(
'
Pitch:
'
,
deg
)
var
deg
=
Math
.
round
(
Cesium
.
Math
.
toDegrees
(
viewer
.
camera
.
roll
))
console
.
log
(
'
Roll:
'
,
deg
)
});
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
// Loading GeoJSON with polygon outline - strokewidth is an issue with windows
// Loading GeoJSON with polygon outline - strokewidth is an issue with windows
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment