Skip to content

Commit 882144d

Browse files
author
caoxinke
committed
添加Legacy下大数据分析服务、地址匹配服务的例子;优化mapbpxgl对接mapv卡顿的问题;fix Leaflet对接mapv动画重绘的问题。
1 parent caa38d2 commit 882144d

33 files changed

+5270
-587
lines changed

build/deps.js

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ var deps = {
208208
"./src/common/online/Online.js"
209209
]
210210
},
211-
"Address": {
212-
"name": "地理匹配服务",
211+
"AddressMatch": {
212+
"name": "地址匹配服务",
213213
"src": [
214214
"./src/leaflet/services/AddressMatchService.js"
215215
]
@@ -375,8 +375,8 @@ var deps = {
375375
"./src/openlayers/services/ProcessingJobsService.js"
376376
]
377377
},
378-
"Address": {
379-
"name": "地理匹配服务",
378+
"AddressMatch": {
379+
"name": "地址匹配服务",
380380
"src": [
381381
"./src/openlayers/services/AddressMatchService.js"
382382
]
@@ -441,7 +441,24 @@ var deps = {
441441
}
442442
}
443443
},
444+
444445
"legacy": {
446+
"services": {
447+
"title": "服务",
448+
"description": "--对接iServer服务",
449+
"ProcessingJobs": {
450+
"name": "大数据分析服务",
451+
"src": [
452+
"./src/legacy/services/ProcessingJobsService.js"
453+
]
454+
},
455+
"AddressMatch": {
456+
"name": "地址匹配服务",
457+
"src": [
458+
"./src/legacy/services/AddressMatchService.js"
459+
]
460+
}
461+
},
445462
"overlay": {
446463
"title": "可视化",
447464
"description": "--对接可视化",

build/webpack.config.legacy.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ module.exports = {
2323
externals: {
2424
'echarts': 'echarts',
2525
'mapv': 'mapv',
26-
'elasticsearch': 'elasticsearch'
26+
'elasticsearch': 'elasticsearch',
27+
'../legacy/libs/SuperMap_Basic-8.1.1-14426.js': 'SuperMap',
28+
'../legacy/libs/SuperMap_Visualization-8.1.1-14426.js': 'SuperMap'
2729
},
2830
module: {
2931
rules: [{
30-
test: /MapVRenderer\.js/,
32+
test: /\.js/,
3133
exclude: /node_modules/,
3234
loader: 'babel-loader',
3335
query: {

dist/iclient9-leaflet.js

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14517,14 +14517,6 @@ var MapVLayer = L.Layer.extend({
1451714517
this.fire("loaded");
1451814518
},
1451914519

14520-
getEvents: function () {
14521-
return {
14522-
moveend: this.draw,
14523-
zoomstart: this._hide,
14524-
zoomend: this._show
14525-
}
14526-
14527-
},
1452814520
_hide: function () {
1452914521
this.canvas.style.display = 'none';
1453014522
},
@@ -17553,6 +17545,9 @@ var MapVRenderer = function (_BaseLayer) {
1755317545
_this.canvasLayer = layer;
1755417546
_this.clickEvent = _this.clickEvent.bind(_this);
1755517547
_this.mousemoveEvent = _this.mousemoveEvent.bind(_this);
17548+
_this.map.on('movestart', _this.moveStartEvent.bind(_this));
17549+
_this.map.on('moveend', _this.moveEndEvent.bind(_this));
17550+
_this.map.on('zoomstart', _this.zoomStartEvent.bind(_this));
1755617551
_this.bindEvent();
1755717552
return _this;
1755817553
}
@@ -17738,24 +17733,41 @@ var MapVRenderer = function (_BaseLayer) {
1773817733
}
1773917734
}, {
1774017735
key: 'addAnimatorEvent',
17741-
value: function addAnimatorEvent() {
17742-
this.map.on('movestart', this.animatorMovestartEvent.bind(this));
17743-
this.map.on('moveend', this.animatorMoveendEvent.bind(this));
17736+
value: function addAnimatorEvent() {}
17737+
}, {
17738+
key: 'moveStartEvent',
17739+
value: function moveStartEvent() {
17740+
var animationOptions = this.options.animation;
17741+
if (this.isEnabledTime() && this.animator) {
17742+
this.steps.step = animationOptions.stepsRange.start;
17743+
this._hide();
17744+
}
17745+
}
17746+
}, {
17747+
key: 'moveEndEvent',
17748+
value: function moveEndEvent() {
17749+
this.canvasLayer.draw();
17750+
this._show();
17751+
}
17752+
}, {
17753+
key: 'zoomStartEvent',
17754+
value: function zoomStartEvent() {
17755+
this._hide();
1774417756
}
1774517757
}, {
1774617758
key: 'clear',
1774717759
value: function clear(context) {
1774817760
context && context.clearRect && context.clearRect(0, 0, context.canvas.width, context.canvas.height);
1774917761
}
1775017762
}, {
17751-
key: 'show',
17752-
value: function show() {
17753-
this.map.addLayer(this.canvasLayer);
17763+
key: '_hide',
17764+
value: function _hide() {
17765+
this.canvasLayer.canvas.style.display = 'none';
1775417766
}
1775517767
}, {
17756-
key: 'hide',
17757-
value: function hide() {
17758-
this.map.removeLayer(this.canvasLayer);
17768+
key: '_show',
17769+
value: function _show() {
17770+
this.canvasLayer.canvas.style.display = 'block';
1775917771
}
1776017772
}, {
1776117773
key: 'draw',
@@ -23521,10 +23533,10 @@ module.exports = {
2352123533
"_requiredBy": [
2352223534
"/"
2352323535
],
23524-
"_resolved": "http://registry.npm.taobao.org/proj4/download/proj4-2.4.3.tgz",
23536+
"_resolved": "https://registry.npmjs.org/proj4/-/proj4-2.4.3.tgz",
2352523537
"_shasum": "f3bb7e631bffc047c36a1a3cc14533a03bbe9969",
2352623538
"_spec": "proj4@2.4.3",
23527-
"_where": "F:\\dev\\iClient9",
23539+
"_where": "E:\\codes\\iClient9",
2352823540
"author": "",
2352923541
"bugs": {
2353023542
"url": "https://github.com/proj4js/proj4js/issues"
@@ -27233,8 +27245,8 @@ var BuildCacheJobParameter = __webpack_require__(202);
2723327245
SuperMap.BuildCacheJobsService = SuperMap.Class(ProcessingJobsServiceBase, {
2723427246

2723527247
initialize: function (url, options) {
27236-
url += "/mapping/buildCache";
2723727248
ProcessingJobsServiceBase.prototype.initialize.apply(this, arguments);
27249+
this.url += "/mapping/buildCache";
2723827250
},
2723927251

2724027252
destroy: function () {
@@ -35646,8 +35658,8 @@ var KernelDensityJobParameter = __webpack_require__(281);
3564635658
SuperMap.KernelDensityJobsService = SuperMap.Class(ProcessingJobsServiceBase, {
3564735659

3564835660
initialize: function (url, options) {
35649-
url += "/spatialanalyst/density";
3565035661
ProcessingJobsServiceBase.prototype.initialize.apply(this, arguments);
35662+
this.url += "/spatialanalyst/density";
3565135663
},
3565235664

3565335665
destroy: function () {
@@ -40118,8 +40130,8 @@ var SummaryMeshJobParameter = __webpack_require__(322);
4011840130
SuperMap.SummaryMeshJobsService = SuperMap.Class(ProcessingJobsServiceBase, {
4011940131

4012040132
initialize: function (url, options) {
40121-
url += "/spatialanalyst/aggregatepoints";
4012240133
ProcessingJobsServiceBase.prototype.initialize.apply(this, arguments);
40134+
this.url += "/spatialanalyst/aggregatepoints";
4012340135
},
4012440136

4012540137
destroy: function () {

0 commit comments

Comments
 (0)