From d74b495736f0c04522ec54274b70fed0ded2878d Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Tue, 27 Jun 2023 11:30:06 +0800
Subject: [PATCH] 任务新增导出
---
public/map/controls/toolbar/tools/StreetViewTool.js | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 58 insertions(+), 0 deletions(-)
diff --git a/public/map/controls/toolbar/tools/StreetViewTool.js b/public/map/controls/toolbar/tools/StreetViewTool.js
new file mode 100644
index 0000000..9e8461b
--- /dev/null
+++ b/public/map/controls/toolbar/tools/StreetViewTool.js
@@ -0,0 +1,58 @@
+/**
+ * 街景部件按钮
+ * @author wenyb 2015-11-2
+ **/
+define([
+ "base/AppEvent",
+ "dojo",
+ "dojo/_base/declare",
+ "dojo/_base/lang",
+ "controls/toolbar/tools/BaseTool",
+ "dojo/dom-style"
+], function(
+ AppEvent,
+ dojo,
+ declare,
+ lang,
+ BaseTool,
+ domStyle
+) {
+ var RL = declare([BaseTool], {
+ constructor: function(args) {
+ this.widgetId="StreetViewWidget";
+ this.tooltip="街景";
+ this._normalIconClass="tool-streetview-normal";
+ this._overIconClass="tool-streetview-over";
+ this._selectedIconClass="tool-streetview-select";
+ this._disableClass="";
+ AppEvent.addAppEventListener(AppEvent.RUN_WIDGET,lang.hitch(this,function(data){
+ if(data == this.widgetId){
+ this.activate("self");
+ }
+ }));
+ },
+ activate: function(args) {
+ if(this._activated){
+ return;
+ }
+ this.inherited(arguments);
+ if(args!=null && args=="self"){
+ return;
+ }
+ AppEvent.dispatchAppEvent(AppEvent.RUN_WIDGET,this.widgetId);
+ },
+ postCreate: function() {
+ this.inherited(arguments);
+ domStyle.set(this.domNode,"position","absolute");
+ domStyle.set(this.domNode,"top","90px");
+ domStyle.set(this.domNode,"left","20px");
+ domStyle.set(this.domNode,"z-index","30");
+ domStyle.set(this.domNode,"border-radius","3px");
+ },
+ deactivate: function() {
+ this.inherited(arguments);
+ AppEvent.dispatchAppEvent(AppEvent.CLOSE_WIDGET,this.widgetId);
+ }
+ });
+ return RL;
+});
\ No newline at end of file
--
Gitblit v1.9.3