-
-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
chenjing
committed
Oct 16, 2024
1 parent
e14675a
commit 6bd8944
Showing
11 changed files
with
102 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,46 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0" /> | ||
<title>dc-example</title> | ||
<script src="/libs/dc-sdk/dc.min.js"></script> | ||
<script src="../dat.gui.min.js"></script> | ||
<link href="/libs/dc-sdk/dc.min.css" type="text/css" rel="stylesheet" /> | ||
<link href="../index.css" type="text/css" rel="stylesheet" /> | ||
</head> | ||
|
||
<body> | ||
<div id="viewer-container" class="viewer-container"></div> | ||
<script> | ||
let viewer = undefined | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
<title>dc-example</title> | ||
<script src='/libs/dc-sdk/dc.min.js'></script> | ||
<script src="../dat.gui.min.js"></script> | ||
<link href='/libs/dc-sdk/dc.min.css' type='text/css' rel='stylesheet'> | ||
<link href='../index.css' type='text/css' rel='stylesheet'> | ||
</head> | ||
function initViewer() { | ||
viewer = new DC.Viewer('viewer-container') | ||
let baseLayer = DC.ImageryLayerFactory.createAMapImageryLayer({ | ||
style: 'img', | ||
crs: 'WGS84', | ||
}) | ||
viewer.addBaseLayer(baseLayer) | ||
viewer.tooltip.enable = true | ||
viewer.on(DC.MouseEventType.MOUSE_MOVE, (e) => { | ||
viewer.tooltip.showAt(e.windowPosition, '我是鼠标提示') | ||
}) | ||
addGuiController() // add controller | ||
} | ||
|
||
<body> | ||
|
||
<div id="viewer-container" class="viewer-container"></div> | ||
<script> | ||
let viewer = undefined | ||
|
||
function initViewer() { | ||
viewer = new DC.Viewer('viewer-container') | ||
let baseLayer = DC.ImageryLayerFactory.createAMapImageryLayer({ | ||
style: 'img', | ||
crs:'WGS84' | ||
}) | ||
viewer.addBaseLayer( baseLayer) | ||
viewer.tooltip.enable = true | ||
viewer.on(DC.MouseEventType.MOUSE_MOVE, e => { | ||
viewer.tooltip.showAt(e.windowPosition, '我是鼠标提示') | ||
}) | ||
addGuiController() // add controller | ||
} | ||
|
||
function addGuiController(){ | ||
let controls = { | ||
enable :true, | ||
} | ||
let gui = new dat.GUI(); | ||
gui.add(controls,'enable',).onChange(value=>{ | ||
viewer.tooltip.enable = value | ||
}) | ||
} | ||
DC.ready({ | ||
baseUrl:'../libs/dc-sdk/resources/' | ||
}).then(initViewer) | ||
</script> | ||
</body> | ||
function addGuiController() { | ||
let controls = { | ||
enable: true, | ||
} | ||
let gui = new dat.GUI() | ||
gui.add(controls, 'enable').onChange((value) => { | ||
viewer.tooltip.enable = value | ||
}) | ||
} | ||
DC.ready({ | ||
baseUrl: '../libs/dc-sdk/resources/', | ||
}).then(initViewer) | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,6 @@ | |
"dist" | ||
], | ||
"dependencies": { | ||
"@dvgis/dc-common": "^3.0.0" | ||
"@dvgis/dc-common": "^3.5.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters