egovamap 0.17.18 → 0.17.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +16 -16
- package/egovamap/EGovaScene.js +196 -196
- package/egovamap/coordconvert/CoordConvConfig.js +5 -5
- package/egovamap/egovaBI.js +989 -989
- package/egovamap/egovagis.js +1289 -1289
- package/egovamap/egovagisviewer.js +2 -2
- package/egovamap/egovaglobe.js +2203 -2203
- package/egovamap/egovamap.css +96 -96
- package/egovamap/egovamap.js +4317 -4317
- package/egovamap/egovamms.js +461 -461
- package/egovamap/globe.html +22 -22
- package/egovamap/globe.jsp +14 -14
- package/egovamap/map.html +26 -26
- package/egovamap/map.jsp +36 -36
- package/egovamap/mapUtils.js +467 -467
- package/egovamap/mapswich.css +159 -159
- package/egovamap/mapswich.js +152 -152
- package/egovamap/mms.jsp +57 -57
- package/index.js +2 -2
- package/map.html +60 -60
- package/package.json +24 -24
package/egovamap/mapswich.js
CHANGED
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
import './mapswich.css';
|
|
2
|
-
|
|
3
|
-
var scene = null;
|
|
4
|
-
var defaultSettings = {
|
|
5
|
-
right: 0,
|
|
6
|
-
bottom: 0,
|
|
7
|
-
left: null,
|
|
8
|
-
top: null
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
var MapSwich = function ($container, settings, pScene, prefix,context) {
|
|
12
|
-
var that = this;
|
|
13
|
-
scene = pScene;
|
|
14
|
-
var parentScene = pScene.pageId || "parentScene";
|
|
15
|
-
var msgPrefix = prefix;
|
|
16
|
-
that.$mapSwichContainer = null;
|
|
17
|
-
that.settings = {};
|
|
18
|
-
if(settings&&(settings['right']||settings['left'])){
|
|
19
|
-
delete defaultSettings['right'];
|
|
20
|
-
delete defaultSettings['left'];
|
|
21
|
-
}
|
|
22
|
-
if(settings&&(settings['bottom']||settings['top'])){
|
|
23
|
-
delete defaultSettings['bottom'];
|
|
24
|
-
delete defaultSettings['top'];
|
|
25
|
-
}
|
|
26
|
-
for(var i in defaultSettings){
|
|
27
|
-
that.settings[i] = defaultSettings[i];
|
|
28
|
-
}
|
|
29
|
-
for(var i in settings){
|
|
30
|
-
that.settings[i] = settings[i];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
that.init = function () {
|
|
34
|
-
that.$mapSwichContainer =$container.getElementsByClassName("mapType-wrapper")[0];
|
|
35
|
-
if (!that.$mapSwichContainer) {
|
|
36
|
-
that.$mapSwichContainer = document.createElement("div");
|
|
37
|
-
that.$mapSwichContainer.id = "mapType-wrapper";
|
|
38
|
-
that.$mapSwichContainer.classList.add("mapType-wrapper");
|
|
39
|
-
var mapSwichHTML='<div class="mapTypeNoMms">' +
|
|
40
|
-
'<div class="mapTypeCard gis"><span>二维</span></div>' +
|
|
41
|
-
'<div class="mapTypeCard globe"><span>三维</span></div>' +
|
|
42
|
-
'</div>';
|
|
43
|
-
that.$mapSwichContainer.innerHTML = mapSwichHTML;
|
|
44
|
-
$container.appendChild(that.$mapSwichContainer);
|
|
45
|
-
}
|
|
46
|
-
that.$mapType =that.$mapSwichContainer.getElementsByClassName("mapTypeNoMms")[0];
|
|
47
|
-
var $bntgis = that.$mapSwichContainer.getElementsByClassName("gis")[0];
|
|
48
|
-
var $bntglobe = that.$mapSwichContainer.getElementsByClassName("globe")[0];
|
|
49
|
-
that.$mapSwichContainer.onmouseover=function () {
|
|
50
|
-
that.$mapSwichContainer.classList.add("expand");
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
that.$mapSwichContainer.onmouseleave=function () {
|
|
54
|
-
that.$mapSwichContainer.classList.remove("expand");
|
|
55
|
-
};
|
|
56
|
-
updateMaptype();
|
|
57
|
-
|
|
58
|
-
function updateMaptype() {
|
|
59
|
-
if (context.currentMapType == "map") {
|
|
60
|
-
$bntgis.classList.add("active");
|
|
61
|
-
$bntglobe.classList.remove("active");
|
|
62
|
-
that.$mapType.removeChild($bntgis);
|
|
63
|
-
that.$mapType.appendChild($bntgis);
|
|
64
|
-
/*that.updatePosition({
|
|
65
|
-
bottom: 0
|
|
66
|
-
});*/
|
|
67
|
-
} else if (context.currentMapType == "globe") {
|
|
68
|
-
$bntgis.classList.remove("active");
|
|
69
|
-
$bntglobe.classList.add("active");
|
|
70
|
-
that.$mapType.removeChild($bntglobe);
|
|
71
|
-
that.$mapType.appendChild($bntglobe);
|
|
72
|
-
/*that.updatePosition({
|
|
73
|
-
bottom: 30
|
|
74
|
-
});*/
|
|
75
|
-
} else {
|
|
76
|
-
$bntgis.classList.remove("active");
|
|
77
|
-
$bntglobe.classList.remove("active");
|
|
78
|
-
/*that.updatePosition({
|
|
79
|
-
bottom: 0
|
|
80
|
-
});*/
|
|
81
|
-
}
|
|
82
|
-
that.updatePosition(that.settings);
|
|
83
|
-
bindClickFn();
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function bindClickFn() {
|
|
87
|
-
$bntgis.onclick=null;
|
|
88
|
-
$bntglobe.onclick=null;
|
|
89
|
-
$bntgis.onclick=function () {
|
|
90
|
-
context.currentMapType = "map";
|
|
91
|
-
updateMaptype();
|
|
92
|
-
scene.fire((msgPrefix + ":openGisMap"), {
|
|
93
|
-
args: []
|
|
94
|
-
}, parentScene, false);
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
$bntglobe.onclick=function (e) {
|
|
98
|
-
var ctl = e.ctrlKey;
|
|
99
|
-
context.currentMapType = "globe";
|
|
100
|
-
updateMaptype();
|
|
101
|
-
scene.fire((msgPrefix + ":openGlobeMap"), {
|
|
102
|
-
args: [ctl]
|
|
103
|
-
}, parentScene, false);
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
that.updatePosition = function (params) {
|
|
109
|
-
that.settings = {};
|
|
110
|
-
for(var i in defaultSettings){
|
|
111
|
-
that.settings[i] = defaultSettings[i];
|
|
112
|
-
}
|
|
113
|
-
for(var i in params){
|
|
114
|
-
that.settings[i] = params[i];
|
|
115
|
-
}
|
|
116
|
-
var style = {};
|
|
117
|
-
for (var key in that.settings) {
|
|
118
|
-
if (that.settings[key] != null) {
|
|
119
|
-
style[key] = that.settings[key];
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if (context.currentMapType == "globe") {
|
|
123
|
-
if (style.bottom == 0) {
|
|
124
|
-
style.bottom = 30;
|
|
125
|
-
}
|
|
126
|
-
if (style.top != null && style.top < 56) {
|
|
127
|
-
style.top = 56
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
for(var i in style){
|
|
131
|
-
if(i=='left')
|
|
132
|
-
that.$mapSwichContainer.style.left = style[i]+'px';
|
|
133
|
-
if(i=='top')
|
|
134
|
-
that.$mapSwichContainer.style.top = style[i]+'px';
|
|
135
|
-
if(i=='right')
|
|
136
|
-
that.$mapSwichContainer.style.right = style[i]+'px';
|
|
137
|
-
if(i=='bottom')
|
|
138
|
-
that.$mapSwichContainer.style.bottom = style[i]+'px';
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
that.hide=function(){
|
|
142
|
-
if($(that.$mapSwichContainer))
|
|
143
|
-
that.$mapSwichContainer.style.display = "none";
|
|
144
|
-
};
|
|
145
|
-
that.show=function(){
|
|
146
|
-
if($(that.$mapSwichContainer))
|
|
147
|
-
that.$mapSwichContainer.style.display = "block";
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
that.init();
|
|
151
|
-
};
|
|
152
|
-
export default MapSwich;
|
|
1
|
+
import './mapswich.css';
|
|
2
|
+
|
|
3
|
+
var scene = null;
|
|
4
|
+
var defaultSettings = {
|
|
5
|
+
right: 0,
|
|
6
|
+
bottom: 0,
|
|
7
|
+
left: null,
|
|
8
|
+
top: null
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
var MapSwich = function ($container, settings, pScene, prefix,context) {
|
|
12
|
+
var that = this;
|
|
13
|
+
scene = pScene;
|
|
14
|
+
var parentScene = pScene.pageId || "parentScene";
|
|
15
|
+
var msgPrefix = prefix;
|
|
16
|
+
that.$mapSwichContainer = null;
|
|
17
|
+
that.settings = {};
|
|
18
|
+
if(settings&&(settings['right']||settings['left'])){
|
|
19
|
+
delete defaultSettings['right'];
|
|
20
|
+
delete defaultSettings['left'];
|
|
21
|
+
}
|
|
22
|
+
if(settings&&(settings['bottom']||settings['top'])){
|
|
23
|
+
delete defaultSettings['bottom'];
|
|
24
|
+
delete defaultSettings['top'];
|
|
25
|
+
}
|
|
26
|
+
for(var i in defaultSettings){
|
|
27
|
+
that.settings[i] = defaultSettings[i];
|
|
28
|
+
}
|
|
29
|
+
for(var i in settings){
|
|
30
|
+
that.settings[i] = settings[i];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
that.init = function () {
|
|
34
|
+
that.$mapSwichContainer =$container.getElementsByClassName("mapType-wrapper")[0];
|
|
35
|
+
if (!that.$mapSwichContainer) {
|
|
36
|
+
that.$mapSwichContainer = document.createElement("div");
|
|
37
|
+
that.$mapSwichContainer.id = "mapType-wrapper";
|
|
38
|
+
that.$mapSwichContainer.classList.add("mapType-wrapper");
|
|
39
|
+
var mapSwichHTML='<div class="mapTypeNoMms">' +
|
|
40
|
+
'<div class="mapTypeCard gis"><span>二维</span></div>' +
|
|
41
|
+
'<div class="mapTypeCard globe"><span>三维</span></div>' +
|
|
42
|
+
'</div>';
|
|
43
|
+
that.$mapSwichContainer.innerHTML = mapSwichHTML;
|
|
44
|
+
$container.appendChild(that.$mapSwichContainer);
|
|
45
|
+
}
|
|
46
|
+
that.$mapType =that.$mapSwichContainer.getElementsByClassName("mapTypeNoMms")[0];
|
|
47
|
+
var $bntgis = that.$mapSwichContainer.getElementsByClassName("gis")[0];
|
|
48
|
+
var $bntglobe = that.$mapSwichContainer.getElementsByClassName("globe")[0];
|
|
49
|
+
that.$mapSwichContainer.onmouseover=function () {
|
|
50
|
+
that.$mapSwichContainer.classList.add("expand");
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
that.$mapSwichContainer.onmouseleave=function () {
|
|
54
|
+
that.$mapSwichContainer.classList.remove("expand");
|
|
55
|
+
};
|
|
56
|
+
updateMaptype();
|
|
57
|
+
|
|
58
|
+
function updateMaptype() {
|
|
59
|
+
if (context.currentMapType == "map") {
|
|
60
|
+
$bntgis.classList.add("active");
|
|
61
|
+
$bntglobe.classList.remove("active");
|
|
62
|
+
that.$mapType.removeChild($bntgis);
|
|
63
|
+
that.$mapType.appendChild($bntgis);
|
|
64
|
+
/*that.updatePosition({
|
|
65
|
+
bottom: 0
|
|
66
|
+
});*/
|
|
67
|
+
} else if (context.currentMapType == "globe") {
|
|
68
|
+
$bntgis.classList.remove("active");
|
|
69
|
+
$bntglobe.classList.add("active");
|
|
70
|
+
that.$mapType.removeChild($bntglobe);
|
|
71
|
+
that.$mapType.appendChild($bntglobe);
|
|
72
|
+
/*that.updatePosition({
|
|
73
|
+
bottom: 30
|
|
74
|
+
});*/
|
|
75
|
+
} else {
|
|
76
|
+
$bntgis.classList.remove("active");
|
|
77
|
+
$bntglobe.classList.remove("active");
|
|
78
|
+
/*that.updatePosition({
|
|
79
|
+
bottom: 0
|
|
80
|
+
});*/
|
|
81
|
+
}
|
|
82
|
+
that.updatePosition(that.settings);
|
|
83
|
+
bindClickFn();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function bindClickFn() {
|
|
87
|
+
$bntgis.onclick=null;
|
|
88
|
+
$bntglobe.onclick=null;
|
|
89
|
+
$bntgis.onclick=function () {
|
|
90
|
+
context.currentMapType = "map";
|
|
91
|
+
updateMaptype();
|
|
92
|
+
scene.fire((msgPrefix + ":openGisMap"), {
|
|
93
|
+
args: []
|
|
94
|
+
}, parentScene, false);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
$bntglobe.onclick=function (e) {
|
|
98
|
+
var ctl = e.ctrlKey;
|
|
99
|
+
context.currentMapType = "globe";
|
|
100
|
+
updateMaptype();
|
|
101
|
+
scene.fire((msgPrefix + ":openGlobeMap"), {
|
|
102
|
+
args: [ctl]
|
|
103
|
+
}, parentScene, false);
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
that.updatePosition = function (params) {
|
|
109
|
+
that.settings = {};
|
|
110
|
+
for(var i in defaultSettings){
|
|
111
|
+
that.settings[i] = defaultSettings[i];
|
|
112
|
+
}
|
|
113
|
+
for(var i in params){
|
|
114
|
+
that.settings[i] = params[i];
|
|
115
|
+
}
|
|
116
|
+
var style = {};
|
|
117
|
+
for (var key in that.settings) {
|
|
118
|
+
if (that.settings[key] != null) {
|
|
119
|
+
style[key] = that.settings[key];
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (context.currentMapType == "globe") {
|
|
123
|
+
if (style.bottom == 0) {
|
|
124
|
+
style.bottom = 30;
|
|
125
|
+
}
|
|
126
|
+
if (style.top != null && style.top < 56) {
|
|
127
|
+
style.top = 56
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
for(var i in style){
|
|
131
|
+
if(i=='left')
|
|
132
|
+
that.$mapSwichContainer.style.left = style[i]+'px';
|
|
133
|
+
if(i=='top')
|
|
134
|
+
that.$mapSwichContainer.style.top = style[i]+'px';
|
|
135
|
+
if(i=='right')
|
|
136
|
+
that.$mapSwichContainer.style.right = style[i]+'px';
|
|
137
|
+
if(i=='bottom')
|
|
138
|
+
that.$mapSwichContainer.style.bottom = style[i]+'px';
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
that.hide=function(){
|
|
142
|
+
if($(that.$mapSwichContainer))
|
|
143
|
+
that.$mapSwichContainer.style.display = "none";
|
|
144
|
+
};
|
|
145
|
+
that.show=function(){
|
|
146
|
+
if($(that.$mapSwichContainer))
|
|
147
|
+
that.$mapSwichContainer.style.display = "block";
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
that.init();
|
|
151
|
+
};
|
|
152
|
+
export default MapSwich;
|
package/egovamap/mms.jsp
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
|
|
2
|
-
<%@ include file="/view/include/common/taglibs.jsp"%>
|
|
3
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
4
|
-
<html style="height:100%;width:100%;">
|
|
5
|
-
<head lang="en">
|
|
6
|
-
<meta charset="UTF-8">
|
|
7
|
-
<title>eGovaMMS实景</title>
|
|
8
|
-
<script type="text/javascript" src="<c:url value='${param.mmsServerUrl}/library/mms/api/MMSAPI.js?clientType=js'/>"></script>
|
|
9
|
-
<script>
|
|
10
|
-
function GetRequest() {
|
|
11
|
-
var url = location.search; //获取url中"?"符后的字串
|
|
12
|
-
var theRequest = new Object();
|
|
13
|
-
if (url.indexOf("?") != -1) {
|
|
14
|
-
var str = url.substr(1);
|
|
15
|
-
strs = str.split("&");
|
|
16
|
-
for(var i = 0; i < strs.length; i ++) {
|
|
17
|
-
theRequest[strs[i].split("=")[0]]=(strs[i].split("=")[1]);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return theRequest;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
var Request = GetRequest();
|
|
24
|
-
|
|
25
|
-
var simpleMode;
|
|
26
|
-
if(Request["simpleMode"]) {
|
|
27
|
-
simpleMode = true;
|
|
28
|
-
}
|
|
29
|
-
window.msgPrefix = Request["msgPrefix"];
|
|
30
|
-
window.parentScene = Request["parentScene"];
|
|
31
|
-
window.proxyURL = Request["proxyUrl"];
|
|
32
|
-
var mmsConfig = {
|
|
33
|
-
panoID : "eGovaMMS",
|
|
34
|
-
msgPrefix: "${param.msgPrefix}",
|
|
35
|
-
mmsWsdlUrl : "${param.mmsWsdlUrl}",
|
|
36
|
-
mmsPicUrl : "${param.mmsPicUrl}",
|
|
37
|
-
mmsSymbolUrl : "${param.mmsSymbolUrl}",
|
|
38
|
-
mediaRootUrl: "${param.mediaRootUrl}",
|
|
39
|
-
mmsServerUrl: "${param.mmsServerUrl}",
|
|
40
|
-
proxyUrl: "${param.proxyUrl}"
|
|
41
|
-
};
|
|
42
|
-
window.mmsConfig = mmsConfig;
|
|
43
|
-
|
|
44
|
-
function init(){
|
|
45
|
-
//初始化实景API
|
|
46
|
-
if(typeof initEgovaMMSAPI != "undefined") {
|
|
47
|
-
console.info("----------initEgovaMMSAPI");
|
|
48
|
-
initEgovaMMSAPI();
|
|
49
|
-
}else {
|
|
50
|
-
console.error("----------initEgovaMMSAPI:failed!check mmsServerUrl.");
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
</script>
|
|
54
|
-
</head>
|
|
55
|
-
<body onload="init();" style="height:100%;width:100%;overflow:hidden;margin:0;">
|
|
56
|
-
<div id="eGovaMMS" name="eGovaMMS" style="width: 100%;height: 100%;border: none;"></div>
|
|
57
|
-
</body>
|
|
1
|
+
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
|
|
2
|
+
<%@ include file="/view/include/common/taglibs.jsp"%>
|
|
3
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
4
|
+
<html style="height:100%;width:100%;">
|
|
5
|
+
<head lang="en">
|
|
6
|
+
<meta charset="UTF-8">
|
|
7
|
+
<title>eGovaMMS实景</title>
|
|
8
|
+
<script type="text/javascript" src="<c:url value='${param.mmsServerUrl}/library/mms/api/MMSAPI.js?clientType=js'/>"></script>
|
|
9
|
+
<script>
|
|
10
|
+
function GetRequest() {
|
|
11
|
+
var url = location.search; //获取url中"?"符后的字串
|
|
12
|
+
var theRequest = new Object();
|
|
13
|
+
if (url.indexOf("?") != -1) {
|
|
14
|
+
var str = url.substr(1);
|
|
15
|
+
strs = str.split("&");
|
|
16
|
+
for(var i = 0; i < strs.length; i ++) {
|
|
17
|
+
theRequest[strs[i].split("=")[0]]=(strs[i].split("=")[1]);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return theRequest;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var Request = GetRequest();
|
|
24
|
+
|
|
25
|
+
var simpleMode;
|
|
26
|
+
if(Request["simpleMode"]) {
|
|
27
|
+
simpleMode = true;
|
|
28
|
+
}
|
|
29
|
+
window.msgPrefix = Request["msgPrefix"];
|
|
30
|
+
window.parentScene = Request["parentScene"];
|
|
31
|
+
window.proxyURL = Request["proxyUrl"];
|
|
32
|
+
var mmsConfig = {
|
|
33
|
+
panoID : "eGovaMMS",
|
|
34
|
+
msgPrefix: "${param.msgPrefix}",
|
|
35
|
+
mmsWsdlUrl : "${param.mmsWsdlUrl}",
|
|
36
|
+
mmsPicUrl : "${param.mmsPicUrl}",
|
|
37
|
+
mmsSymbolUrl : "${param.mmsSymbolUrl}",
|
|
38
|
+
mediaRootUrl: "${param.mediaRootUrl}",
|
|
39
|
+
mmsServerUrl: "${param.mmsServerUrl}",
|
|
40
|
+
proxyUrl: "${param.proxyUrl}"
|
|
41
|
+
};
|
|
42
|
+
window.mmsConfig = mmsConfig;
|
|
43
|
+
|
|
44
|
+
function init(){
|
|
45
|
+
//初始化实景API
|
|
46
|
+
if(typeof initEgovaMMSAPI != "undefined") {
|
|
47
|
+
console.info("----------initEgovaMMSAPI");
|
|
48
|
+
initEgovaMMSAPI();
|
|
49
|
+
}else {
|
|
50
|
+
console.error("----------initEgovaMMSAPI:failed!check mmsServerUrl.");
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
</script>
|
|
54
|
+
</head>
|
|
55
|
+
<body onload="init();" style="height:100%;width:100%;overflow:hidden;margin:0;">
|
|
56
|
+
<div id="eGovaMMS" name="eGovaMMS" style="width: 100%;height: 100%;border: none;"></div>
|
|
57
|
+
</body>
|
|
58
58
|
</html>
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var EGovaMap = require('./egovamap/egovamap').default;
|
|
2
|
-
module.exports = EGovaMap;
|
|
1
|
+
var EGovaMap = require('./egovamap/egovamap').default;
|
|
2
|
+
module.exports = EGovaMap;
|
package/map.html
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<head></head>
|
|
3
|
-
<style>
|
|
4
|
-
.map{
|
|
5
|
-
width:100%;
|
|
6
|
-
height:100%;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
</style>
|
|
10
|
-
<body>
|
|
11
|
-
<div id="map"></div>
|
|
12
|
-
<script src="./build/source/egovamap.js"></script>
|
|
13
|
-
<script>
|
|
14
|
-
|
|
15
|
-
var mapConfig = {params:{navi:"{visible:true,left:20,top:90}",
|
|
16
|
-
toolbar:"{items:'zoomin,zoomout,pan,fullextent,measurelength,measurearea,refresh,layertree,identify,snap,locatexy',visible:true,left:20,top:60}",
|
|
17
|
-
geocode:"{visible:true,right:20,top:60}",trace:"{right:5,bottom:185}",switchbar:"{right:20,top:102}",layertree:"{top:160}"},
|
|
18
|
-
mapconfig3D:{ toolbar:"{ visible:true,left:20,top:60}"},
|
|
19
|
-
maskPos : {top:95}
|
|
20
|
-
};
|
|
21
|
-
var context = {
|
|
22
|
-
rootPath:"http://localhost:8081/eUrbanGIS/",
|
|
23
|
-
humanID:"",
|
|
24
|
-
gisServerURL:"http://localhost:8081/eUrbanGIS/",
|
|
25
|
-
originPath:"",
|
|
26
|
-
mapCenterFlag:"",
|
|
27
|
-
coordinateX:"",
|
|
28
|
-
coordinateY:"",
|
|
29
|
-
humanLayerUsageID:"",
|
|
30
|
-
regionCode:"",
|
|
31
|
-
humanLayerKeyFieldName:"",
|
|
32
|
-
mapZoomRange:"",
|
|
33
|
-
mmsEnabled:"",
|
|
34
|
-
mmsParams:"",
|
|
35
|
-
globeParams:"",
|
|
36
|
-
globeEnabled:true,
|
|
37
|
-
globeServerURL:"http://localhost:8081/eUrbanGIS/",
|
|
38
|
-
globeCallBack:"",
|
|
39
|
-
gisEnabled:true,
|
|
40
|
-
currentMapType:"",
|
|
41
|
-
mmsServerURL:"",
|
|
42
|
-
assetsPath:""
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
var context = {
|
|
46
|
-
/*rootPath:"http://localhost:8081/eUrbanGIS/",*/
|
|
47
|
-
gisServerURL:"http://localhost:8081/eUrbanGIS/",
|
|
48
|
-
gisEnabled:true,
|
|
49
|
-
mapType:"emap",
|
|
50
|
-
assetsPath:""
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var emap = egovamap.getInstance(document.getElementById("map"),function(e){
|
|
55
|
-
setTimeout(function(){
|
|
56
|
-
emap.centerAndZoom(null,null,-1);
|
|
57
|
-
},5000);
|
|
58
|
-
}, mapConfig,null,null,context);
|
|
59
|
-
</script>
|
|
60
|
-
</body>
|
|
1
|
+
<html>
|
|
2
|
+
<head></head>
|
|
3
|
+
<style>
|
|
4
|
+
.map{
|
|
5
|
+
width:100%;
|
|
6
|
+
height:100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
</style>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="map"></div>
|
|
12
|
+
<script src="./build/source/egovamap.js"></script>
|
|
13
|
+
<script>
|
|
14
|
+
|
|
15
|
+
var mapConfig = {params:{navi:"{visible:true,left:20,top:90}",
|
|
16
|
+
toolbar:"{items:'zoomin,zoomout,pan,fullextent,measurelength,measurearea,refresh,layertree,identify,snap,locatexy',visible:true,left:20,top:60}",
|
|
17
|
+
geocode:"{visible:true,right:20,top:60}",trace:"{right:5,bottom:185}",switchbar:"{right:20,top:102}",layertree:"{top:160}"},
|
|
18
|
+
mapconfig3D:{ toolbar:"{ visible:true,left:20,top:60}"},
|
|
19
|
+
maskPos : {top:95}
|
|
20
|
+
};
|
|
21
|
+
var context = {
|
|
22
|
+
rootPath:"http://localhost:8081/eUrbanGIS/",
|
|
23
|
+
humanID:"",
|
|
24
|
+
gisServerURL:"http://localhost:8081/eUrbanGIS/",
|
|
25
|
+
originPath:"",
|
|
26
|
+
mapCenterFlag:"",
|
|
27
|
+
coordinateX:"",
|
|
28
|
+
coordinateY:"",
|
|
29
|
+
humanLayerUsageID:"",
|
|
30
|
+
regionCode:"",
|
|
31
|
+
humanLayerKeyFieldName:"",
|
|
32
|
+
mapZoomRange:"",
|
|
33
|
+
mmsEnabled:"",
|
|
34
|
+
mmsParams:"",
|
|
35
|
+
globeParams:"",
|
|
36
|
+
globeEnabled:true,
|
|
37
|
+
globeServerURL:"http://localhost:8081/eUrbanGIS/",
|
|
38
|
+
globeCallBack:"",
|
|
39
|
+
gisEnabled:true,
|
|
40
|
+
currentMapType:"",
|
|
41
|
+
mmsServerURL:"",
|
|
42
|
+
assetsPath:""
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
var context = {
|
|
46
|
+
/*rootPath:"http://localhost:8081/eUrbanGIS/",*/
|
|
47
|
+
gisServerURL:"http://localhost:8081/eUrbanGIS/",
|
|
48
|
+
gisEnabled:true,
|
|
49
|
+
mapType:"emap",
|
|
50
|
+
assetsPath:""
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
var emap = egovamap.getInstance(document.getElementById("map"),function(e){
|
|
55
|
+
setTimeout(function(){
|
|
56
|
+
emap.centerAndZoom(null,null,-1);
|
|
57
|
+
},5000);
|
|
58
|
+
}, mapConfig,null,null,context);
|
|
59
|
+
</script>
|
|
60
|
+
</body>
|
|
61
61
|
</html>
|
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "egovamap",
|
|
3
|
-
"version": "0.17.
|
|
4
|
-
"description": "eUrbanGIS SDK",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"version:minor": "npm version minor -m \"[A]发布 v%s\"",
|
|
8
|
-
"version:patch": "npm version patch -m \"[A]发布修复版本 v%s\"",
|
|
9
|
-
"pub": "npm publish --registry https://registry.npmjs.org/",
|
|
10
|
-
"postpublish": "git push && git push --tags",
|
|
11
|
-
"start": "parcel test/test.html"
|
|
12
|
-
},
|
|
13
|
-
"author": "egova",
|
|
14
|
-
"license": "MIT",
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"egovacoordconvert": "1.0.0"
|
|
17
|
-
},
|
|
18
|
-
"engines": {
|
|
19
|
-
"node": ">=12.13"
|
|
20
|
-
},
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
"parcel": "^2.3.1"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "egovamap",
|
|
3
|
+
"version": "0.17.21",
|
|
4
|
+
"description": "eUrbanGIS SDK",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"version:minor": "npm version minor -m \"[A]发布 v%s\"",
|
|
8
|
+
"version:patch": "npm version patch -m \"[A]发布修复版本 v%s\"",
|
|
9
|
+
"pub": "npm publish --registry https://registry.npmjs.org/",
|
|
10
|
+
"postpublish": "git push && git push --tags",
|
|
11
|
+
"start": "parcel test/test.html"
|
|
12
|
+
},
|
|
13
|
+
"author": "egova",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"egovacoordconvert": "1.0.0"
|
|
17
|
+
},
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=12.13"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"parcel": "^2.3.1"
|
|
23
|
+
}
|
|
24
|
+
}
|