FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
WebWorldWind/examples/SimplestExample.html at develop · EarthViewer/WebWorldWind · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
EarthViewer
/
WebWorldWind
Public
forked from
NASAWorldWind/WebWorldWind
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
WebWorldWind
/
examples
/
SimplestExample.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
37 lines (34 loc) · 1.34 KB
Breadcrumbs
WebWorldWind
/
examples
/
SimplestExample.html
Copy path
File metadata and controls
37 lines (34 loc) · 1.34 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html
>
<!-- This is a very simple example of using Web WorldWind. -->
<
html
>
<
head
lang
="
en
"
>
<
meta
charset
="
utf-8
"
>
<
title
>
WorldWind Simplest Example
</
title
>
<!-- Include the Web WorldWind library. -->
<
script
src
="
../worldwind.min.js
"
type
="
text/javascript
"
>
</
script
>
</
head
>
<
body
>
<
div
style
="
position: absolute; top: 50px; left: 50px;
"
>
<!-- Create a canvas for Web WorldWind. -->
<
canvas
id
="
canvasOne
"
width
="
1024
"
height
="
768
"
>
Your browser does not support HTML5 Canvas.
</
canvas
>
</
div
>
<
script
>
// Register an event listener to be called when the page is loaded.
window
.
addEventListener
(
"load"
,
eventWindowLoaded
,
false
)
;
// Define the event listener to initialize Web WorldWind.
function
eventWindowLoaded
(
)
{
// Create a WorldWindow for the canvas.
var
wwd
=
new
WorldWind
.
WorldWindow
(
"canvasOne"
)
;
// Add some image layers to the WorldWindow's globe.
wwd
.
addLayer
(
new
WorldWind
.
BMNGOneImageLayer
(
)
)
;
wwd
.
addLayer
(
new
WorldWind
.
BingAerialWithLabelsLayer
(
)
)
;
// Add a compass, a coordinates display and some view controls to the WorldWindow.
wwd
.
addLayer
(
new
WorldWind
.
CompassLayer
(
)
)
;
wwd
.
addLayer
(
new
WorldWind
.
CoordinatesDisplayLayer
(
wwd
)
)
;
wwd
.
addLayer
(
new
WorldWind
.
ViewControlsLayer
(
wwd
)
)
;
}
</
script
>
</
body
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL