From 0ded284e8ef21e2e767d0b7b2661655cf1dc7eaf Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 08 Jun 2021 17:39:38 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/pyhmap
---
widgets/SceneMode/Widget.js | 104 +++++++++++++++++++++++++++++++++++----------------
1 files changed, 71 insertions(+), 33 deletions(-)
diff --git a/widgets/SceneMode/Widget.js b/widgets/SceneMode/Widget.js
index c3353e0..3d96cce 100644
--- a/widgets/SceneMode/Widget.js
+++ b/widgets/SceneMode/Widget.js
@@ -1,42 +1,80 @@
///////////////////////////////////////////////////////////////////////////
-// Copyright © 2018 NarutoGIS. All Rights Reserved.
-// 模块描述:控制地图二三维模式切换
+// Copyright © 2019 zhongsong. 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], {
+ 'dojo/_base/declare',
+ 'dojo/_base/lang',
+ 'dojo/_base/array',
+ 'dojo/_base/html',
+ 'dojo/topic',
+ 'jimu/BaseWidget',
+ 'jimu/utils',
+ 'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css',
+ 'libs/zTree_v3/js/jquery.ztree.all'
+ ],
+ function (declare,
+ lang,
+ array,
+ html,
+ topic,
+ BaseWidget,
+ aspect,
+ string,
+ utils
+ ) {
+ return declare([BaseWidget], {
+ baseClass: 'jimu-widget-SceneMode',
+ name: 'SceneMode',
+ layers: {},
+ startup: function () {
+ var that = this;
+ console.log(that.map, 213)
+ $(".jimu-widget-SceneMode button").html("<img src='../../../images/2D.png' alt='' title='2D'>");
- name: 'SceneMode',
- baseClass: 'jimu-widget-SceneMode',
+ $(".jimu-widget-SceneMode button").click(function () {
+ if ($(".jimu-widget-SceneMode button img").attr('title') == "2D") {
+ $(".jimu-widget-SceneMode button").html("<img src='../../../images/3D.png' alt='' title='3D'>");
+ that.map.scene.morphTo2D(0);
+ } else {
+ $(".jimu-widget-SceneMode button").html("<img src='../../../images/2D.png' alt='' title='2D'>");
+ that.map.scene.morphTo3D(0);
- postCreate: function() {
- this.inherited(arguments);
- },
+ }
+ })
+ },
- startup: function() {
- this.inherited(arguments);
- new Cesium.SceneModePicker(this.domNode, this.map.scene);
+ closeToolBox: function (item) {
+
+ },
- $('.cesium-sceneModePicker-button3D').next().next().next().css({'right': 95, 'bottom': 75})
+ onOpen: function () {
+ //面板打开的时候触发 (when open this panel trigger)
+ },
- $('.cesium-sceneModePicker-button3D').attr('title','三维视图');
- }
+ onClose: function () {
+ //面板关闭的时候触发 (when this panel is closed trigger)
+ },
- });
- return clazz;
- });
\ No newline at end of file
+ onMinimize: function () {
+ this.resize();
+ },
+
+ onMaximize: function () {
+ this.resize();
+ },
+
+ resize: function () {
+
+ },
+
+
+ destroy: function () {
+ //销毁的时候触发
+ //todo
+ //do something before this func
+ this.inherited(arguments);
+ }
+
+ });
+ });
\ No newline at end of file
--
Gitblit v1.9.3