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
38
39
40
41
42
43
44
45
46
| ///////////////////////////////////////////////////////////////////////////
| // Copyright © 2018 NarutoGIS. All Rights Reserved.
| // 模块描述:按钮恢复全图视角
| ///////////////////////////////////////////////////////////////////////////
| define([
| 'dojo/_base/declare',
| 'dojo/_base/lang',
| 'jimu/BaseWidget',
| 'dojo/_base/html',
| 'dojo/dom-construct',
| 'dojo/topic',
| 'dojo/on'
| ],
| function(
| declare,
| lang,
| BaseWidget,
| html,
| domConstruct,
| topic,
| on) {
| var clazz = declare([BaseWidget], {
|
| name: 'HomeButton',
| baseClass: 'jimu-widget-homebutton',
|
| postCreate: function() {
| this.inherited(arguments);
| },
|
| startup: function() {
| this.inherited(arguments);
|
| var homeButton = new Cesium.HomeButton(this.domNode, this.map.scene);
|
| $(".jimu-widget-homebutton button.cesium-button").html("<img src='./images/回到原来的视角.png' alt=''>");
|
| // Subscribe to the home button beforeExecute event so that we can clear the trackedEntity.
| this.map._eventHelper.add(homeButton.viewModel.command.beforeExecute, Cesium.Viewer.prototype._clearTrackedObject, this.map);
|
| // $('.cesium-sceneModePicker-button3D').attr('title','三维视图');
| }
|
| });
| return clazz;
| });
|
|