Skip to content

Commit 7aa6ec2

Browse files
author
caoxinke
committed
EchartMapLyer更名为EchartsLayer;GraphicGroup更名为GraphicLayer;fix 分布式空间处理服务不出结果的问题;优化graphiclayer例子。
1 parent 6617466 commit 7aa6ec2

28 files changed

+158
-219
lines changed

build/deps.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,23 +335,23 @@ deps = {
335335
"Overlay": {
336336
"title": "可视化",
337337
"description": "数据可视化效果扩展",
338-
"EChartMapLayer": {
338+
"EChartsLayer": {
339339
"name": "ECharts地图图层",
340340
"src": [
341-
"./src/leaflet/overlay/EChartMapLayer.js"
341+
"./src/leaflet/overlay/EChartsLayer.js"
342342
],
343343
"modules": [{
344-
"name": "L.supermap.echartsMapLayer",
344+
"name": "L.supermap.echartsLayer",
345345
"des": "百度Ecahrts可视化效果"
346346
}]
347347
},
348348
"GraphicLayer": {
349349
"name": "高效率点图层",
350350
"src": [
351-
"./src/leaflet/overlay/GraphicGroup.js"
351+
"./src/leaflet/overlay/GraphicLayer.js"
352352
],
353353
"modules": [{
354-
"name": "L.supermap.graphicGroup",
354+
"name": "L.supermap.graphicLayer",
355355
"des": "高效率点图层效果"
356356
}]
357357
},

build/jsdocs/leaflet/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ SuperMap iClient for Leaflet 是一套基于Leaflet的云GIS网络客户端开
2929
</tr><tr>
3030
<td><p>丰富的可视化效果,矢量瓦片、客户端专题图、开源可视化库[ECharts](http://echarts.baidu.com/),[MapV](http://mapv.baidu.com/)</p>
3131
[L.supermap.tiledVectorLayer](L.supermap.tiledVectorLayer.html)<br>
32-
[L.supermap.graphicGroup](L.supermap.graphicGroup.html)<br>
32+
[L.supermap.graphicLayer](L.supermap.graphicLayer.html)<br>
3333
[L.supermap.dataFlowLayer](L.supermap.dataFlowLayer.html)<br>
3434
[L.supermap.rangeThemeLayer](L.supermap.rangeThemeLayer.html)<br>
35-
[L.supermap.echartsMapLayer](L.supermap.echartsMapLayer.html)<br>
35+
[L.supermap.echartsLayer](L.supermap.echartsLayer.html)<br>
3636
[L.supermap.mapVLayer](L.supermap.mapVLayer.html)<br>
3737
......</td>
3838
<td><p>丰富地图,iSevrer REST MAP、互联网地图、OGC服务</p>

dist/iclient9-leaflet.js

Lines changed: 19 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -17666,7 +17666,7 @@ _leaflet2["default"].supermap.dataFlowLayer = dataFlowLayer;
1766617666
Object.defineProperty(exports, "__esModule", {
1766717667
value: true
1766817668
});
17669-
exports.echartsMapLayer = exports.EchartsMapLayer = undefined;
17669+
exports.echartsLayer = exports.EchartsLayer = undefined;
1767017670
exports.LeafletMapCoordSys = LeafletMapCoordSys;
1767117671

1767217672
__webpack_require__(4);
@@ -17682,15 +17682,15 @@ var _echarts2 = _interopRequireDefault(_echarts);
1768217682
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
1768317683

1768417684
/**
17685-
* @class L.supermap.echartsMapLayer
17685+
* @class L.supermap.echartsLayer
1768617686
* @classdesc 图表地图图层类。
1768717687
* @extends L.Layer{@linkdoc-leaflet/#layer}
1768817688
* @param echartsOptions - {Object} 图表参数
1768917689
* @param options - {Object} 可选图层参数。<br>
1769017690
* attribution - {string} 版权信息。<br>
1769117691
* loadWhileAnimating - {boolean} 是否在启动时加载。
1769217692
*/
17693-
var EchartsMapLayer = exports.EchartsMapLayer = _leaflet2["default"].Layer.extend({
17693+
var EchartsLayer = exports.EchartsLayer = _leaflet2["default"].Layer.extend({
1769417694

1769517695
includes: [],
1769617696
_echartsContainer: null,
@@ -17714,7 +17714,7 @@ var EchartsMapLayer = exports.EchartsMapLayer = _leaflet2["default"].Layer.exten
1771417714
},
1771517715

1771617716
/**
17717-
* @function L.supermap.echartsMapLayer.prototype.setOption
17717+
* @function L.supermap.echartsLayer.prototype.setOption
1771817718
* @description 设置图表地图参数
1771917719
* @param echartsOptions - {Object} 图表参数
1772017720
* @param notMerge - {boolean} 是否合并参数
@@ -17738,7 +17738,7 @@ var EchartsMapLayer = exports.EchartsMapLayer = _leaflet2["default"].Layer.exten
1773817738
},
1773917739

1774017740
/**
17741-
* @function L.supermap.echartsMapLayer.prototype.onAdd
17741+
* @function L.supermap.echartsLayer.prototype.onAdd
1774217742
* @description 添加地图
1774317743
* @param map - {L.map} 待添加的地图
1774417744
*/
@@ -17799,6 +17799,7 @@ var EchartsMapLayer = exports.EchartsMapLayer = _leaflet2["default"].Layer.exten
1779917799
});
1780017800
me._enableEchartsContainer();
1780117801
}
17802+
1780217803
if (me.options.loadWhileAnimating) {
1780317804
leafletMap.off('move', this._oldMoveHandler);
1780417805
} else {
@@ -17895,10 +17896,10 @@ LeafletMapCoordSys.create = function (ecModel, api) {
1789517896
});
1789617897
};
1789717898

17898-
var echartsMapLayer = exports.echartsMapLayer = function echartsMapLayer(echartsOptions, options) {
17899-
return new EchartsMapLayer(echartsOptions, options);
17899+
var echartsLayer = exports.echartsLayer = function echartsLayer(echartsOptions, options) {
17900+
return new EchartsLayer(echartsOptions, options);
1790017901
};
17901-
_leaflet2["default"].supermap.echartsMapLayer = echartsMapLayer;
17902+
_leaflet2["default"].supermap.echartsLayer = echartsLayer;
1790217903

1790317904
/***/ }),
1790417905
/* 103 */
@@ -17910,7 +17911,7 @@ _leaflet2["default"].supermap.echartsMapLayer = echartsMapLayer;
1791017911
Object.defineProperty(exports, "__esModule", {
1791117912
value: true
1791217913
});
17913-
exports.graphicGroup = exports.GraphicGroup = undefined;
17914+
exports.graphicLayer = exports.GraphicLayer = undefined;
1791417915

1791517916
__webpack_require__(4);
1791617917

@@ -17925,7 +17926,7 @@ __webpack_require__(326);
1792517926
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
1792617927

1792717928
/**
17928-
* @class L.supermap.graphicGroup
17929+
* @class L.supermap.graphicLayer
1792917930
* @classdesc 图形组合类。
1793017931
* @extends L.Path{@linkdoc-leaflet/#path}
1793117932
* @param graphics - {Object} 图形成员
@@ -17942,7 +17943,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
1794217943
* fillRule - {string} 填充形状
1794317944
* radius - {number}半径
1794417945
*/
17945-
var GraphicGroup = exports.GraphicGroup = _leaflet2["default"].Path.extend({
17946+
var GraphicLayer = exports.GraphicLayer = _leaflet2["default"].Path.extend({
1794617947

1794717948
initialize: function initialize(graphics, options) {
1794817949
options = options || {};
@@ -17951,9 +17952,9 @@ var GraphicGroup = exports.GraphicGroup = _leaflet2["default"].Path.extend({
1795117952
},
1795217953

1795317954
/**
17954-
* @function L.supermap.graphicGroup.prototype.getEvents
17955+
* @function L.supermap.graphicLayer.prototype.getEvents
1795517956
* @description 获取事件
17956-
* @return {{click: L.supermap.GraphicGroup._handleClick}}
17957+
* @return {{click: L.supermap.graphicLayer._handleClick}}
1795717958
*/
1795817959
getEvents: function getEvents() {
1795917960
var events = {
@@ -17963,7 +17964,7 @@ var GraphicGroup = exports.GraphicGroup = _leaflet2["default"].Path.extend({
1796317964
},
1796417965

1796517966
/**
17966-
* @function L.supermap.graphicGroup.prototype.onAdd
17967+
* @function L.supermap.graphicLayer.prototype.onAdd
1796717968
* @description 添加图形
1796817969
*/
1796917970
onAdd: function onAdd() {
@@ -18043,11 +18044,11 @@ _leaflet2["default"].Canvas.include({
1804318044
}
1804418045
});
1804518046

18046-
var graphicGroup = exports.graphicGroup = function graphicGroup(graphics, options) {
18047-
return new GraphicGroup(graphics, options);
18047+
var graphicLayer = exports.graphicLayer = function graphicLayer(graphics, options) {
18048+
return new GraphicLayer(graphics, options);
1804818049
};
1804918050

18050-
_leaflet2["default"].supermap.graphicGroup = graphicGroup;
18051+
_leaflet2["default"].supermap.graphicLayer = graphicLayer;
1805118052

1805218053
/***/ }),
1805318054
/* 104 */
@@ -62315,108 +62316,7 @@ eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a
6231562316
/* 382 */
6231662317
/***/ (function(module, exports) {
6231762318

62318-
module.exports = {
62319-
"_from": "proj4@2.3.15",
62320-
"_id": "proj4@2.3.15",
62321-
"_inBundle": false,
62322-
"_integrity": "sha1-WtBui8owvg/6OJpJ5FZfUfBtCJ4=",
62323-
"_location": "/proj4",
62324-
"_phantomChildren": {},
62325-
"_requested": {
62326-
"type": "version",
62327-
"registry": true,
62328-
"raw": "proj4@2.3.15",
62329-
"name": "proj4",
62330-
"escapedName": "proj4",
62331-
"rawSpec": "2.3.15",
62332-
"saveSpec": null,
62333-
"fetchSpec": "2.3.15"
62334-
},
62335-
"_requiredBy": [
62336-
"/"
62337-
],
62338-
"_resolved": "https://registry.npmjs.org/proj4/-/proj4-2.3.15.tgz",
62339-
"_shasum": "5ad06e8bca30be0ffa389a49e4565f51f06d089e",
62340-
"_spec": "proj4@2.3.15",
62341-
"_where": "G:\\github-iClient\\iClient9",
62342-
"author": "",
62343-
"bugs": {
62344-
"url": "https://github.com/proj4js/proj4js/issues"
62345-
},
62346-
"bundleDependencies": false,
62347-
"contributors": [
62348-
{
62349-
"name": "Mike Adair",
62350-
"email": "madair@dmsolutions.ca"
62351-
},
62352-
{
62353-
"name": "Richard Greenwood",
62354-
"email": "rich@greenwoodmap.com"
62355-
},
62356-
{
62357-
"name": "Calvin Metcalf",
62358-
"email": "calvin.metcalf@gmail.com"
62359-
},
62360-
{
62361-
"name": "Richard Marsden",
62362-
"url": "http://www.winwaed.com"
62363-
},
62364-
{
62365-
"name": "T. Mittan"
62366-
},
62367-
{
62368-
"name": "D. Steinwand"
62369-
},
62370-
{
62371-
"name": "S. Nelson"
62372-
}
62373-
],
62374-
"dependencies": {
62375-
"mgrs": "~0.0.2"
62376-
},
62377-
"deprecated": false,
62378-
"description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",
62379-
"devDependencies": {
62380-
"browserify": "~12.0.1",
62381-
"chai": "~1.8.1",
62382-
"curl": "git://github.com/cujojs/curl.git",
62383-
"grunt": "~0.4.2",
62384-
"grunt-browserify": "~4.0.1",
62385-
"grunt-cli": "~0.1.13",
62386-
"grunt-contrib-connect": "~0.6.0",
62387-
"grunt-contrib-jshint": "~0.8.0",
62388-
"grunt-contrib-uglify": "~0.11.1",
62389-
"grunt-mocha-phantomjs": "~0.4.0",
62390-
"istanbul": "~0.2.4",
62391-
"mocha": "~1.17.1",
62392-
"tin": "~0.4.0"
62393-
},
62394-
"directories": {
62395-
"test": "test",
62396-
"doc": "docs"
62397-
},
62398-
"homepage": "https://github.com/proj4js/proj4js#readme",
62399-
"jam": {
62400-
"main": "dist/proj4.js",
62401-
"include": [
62402-
"dist/proj4.js",
62403-
"README.md",
62404-
"AUTHORS",
62405-
"LICENSE.md"
62406-
]
62407-
},
62408-
"license": "MIT",
62409-
"main": "lib/index.js",
62410-
"name": "proj4",
62411-
"repository": {
62412-
"type": "git",
62413-
"url": "git://github.com/proj4js/proj4js.git"
62414-
},
62415-
"scripts": {
62416-
"test": "./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha test/test.js"
62417-
},
62418-
"version": "2.3.15"
62419-
};
62319+
module.exports = {"_from":"proj4@2.3.15","_id":"proj4@2.3.15","_inBundle":false,"_integrity":"sha1-WtBui8owvg/6OJpJ5FZfUfBtCJ4=","_location":"/proj4","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"proj4@2.3.15","name":"proj4","escapedName":"proj4","rawSpec":"2.3.15","saveSpec":null,"fetchSpec":"2.3.15"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/proj4/-/proj4-2.3.15.tgz","_shasum":"5ad06e8bca30be0ffa389a49e4565f51f06d089e","_spec":"proj4@2.3.15","_where":"E:\\codes\\iClient9","author":"","bugs":{"url":"https://github.com/proj4js/proj4js/issues"},"bundleDependencies":false,"contributors":[{"name":"Mike Adair","email":"madair@dmsolutions.ca"},{"name":"Richard Greenwood","email":"rich@greenwoodmap.com"},{"name":"Calvin Metcalf","email":"calvin.metcalf@gmail.com"},{"name":"Richard Marsden","url":"http://www.winwaed.com"},{"name":"T. Mittan"},{"name":"D. Steinwand"},{"name":"S. Nelson"}],"dependencies":{"mgrs":"~0.0.2"},"deprecated":false,"description":"Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.","devDependencies":{"browserify":"~12.0.1","chai":"~1.8.1","curl":"git://github.com/cujojs/curl.git","grunt":"~0.4.2","grunt-browserify":"~4.0.1","grunt-cli":"~0.1.13","grunt-contrib-connect":"~0.6.0","grunt-contrib-jshint":"~0.8.0","grunt-contrib-uglify":"~0.11.1","grunt-mocha-phantomjs":"~0.4.0","istanbul":"~0.2.4","mocha":"~1.17.1","tin":"~0.4.0"},"directories":{"test":"test","doc":"docs"},"homepage":"https://github.com/proj4js/proj4js#readme","jam":{"main":"dist/proj4.js","include":["dist/proj4.js","README.md","AUTHORS","LICENSE.md"]},"license":"MIT","main":"lib/index.js","name":"proj4","repository":{"type":"git","url":"git://github.com/proj4js/proj4js.git"},"scripts":{"test":"./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha test/test.js"},"version":"2.3.15"}
6242062320

6242162321
/***/ }),
6242262322
/* 383 */

dist/iclient9-leaflet.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/classic/SummaryMeshJobService.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h3 class="panel-title">点聚合分析</h3>
3939
<div class="input-group">
4040
<span class="input-group-addon">输入数据<span title="必填字段" style="color: red;"> * </span> </span>
4141
<input id="datasetName" type="text" class="form-control"
42-
value="samples_processing_newyorkPoint_P"/>
42+
value="samples_newyork_taxi_2013-01_14k"/>
4343
</div>
4444
<p>
4545
<div class="input-group">

examples/classic/kernelDensityJobService.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h3 class="panel-title">密度分析</h3>
3939
<div class="input-group">
4040
<span class="input-group-addon">输入数据<span title='必填字段' style='color: red;'> * </span> </span>
4141
<input id="datasetName" type="text" class="form-control"
42-
value="samples_processing_newyorkPoint_P"/>
42+
value="samples_newyork_taxi_2013-01_14k"/>
4343
</div>
4444
<p>
4545
<div class="input-group">

examples/leaflet/12_graphicLayer.html

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</head>
88
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
99
<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
10-
10+
<script type="text/javascript" src="http://cdn.bootcss.com/randomcolor/0.5.2/randomColor.min.js"></script>
1111
<script type="text/javascript" src="http://cdn.bootcss.com/leaflet/1.0.3/leaflet.js"></script>
1212
<script type="text/javascript" src="../../dist/iclient9-leaflet.min.js"></script>
1313
<script type="text/javascript">
@@ -21,34 +21,51 @@
2121
});
2222
var url = "http://support.supermap.com.cn:8090/iserver/services/map-world/rest/maps/World";
2323
L.supermap.tiledMapLayer(url).addTo(map);
24-
addGraphicGroup();
24+
var colorCount = 10;
25+
var colors = getRandomColors(colorCount);
26+
addGraphicLayer();
2527

26-
function addGraphicGroup() {
27-
var circleStyle = L.supermap.circleStyle({
28-
color: 'rgba(255,204,0,1)',
29-
radius: 7.5,
30-
fill: true,
31-
fillColor: 'rgba(255,153,0, 1)',
32-
fillOpacity: 1
33-
});
28+
function addGraphicLayer() {
3429
var count = 100000;
3530
var graphics = [];
3631
var e = 45;
32+
var randomCircleStyles = [];
33+
for (var i = 0; i < colorCount; i++) {
34+
randomCircleStyles.push(L.supermap.circleStyle({
35+
color: colors[i],
36+
opacity: 1,
37+
radius: Math.floor(Math.random() * 15 + 1),
38+
fill: true,
39+
fillColor: colors[i],
40+
fillOpacity: 1
41+
}));
42+
}
43+
3744
for (var i = 0; i < count; ++i) {
3845
var coordinates = [2 * e * Math.random() - e, 2 * e * Math.random() - e];
3946
graphics[i] = L.supermap.graphic({
4047
_latlng: L.latLng(coordinates[0], coordinates[1]),
41-
_canvas: circleStyle.getCanvas()
48+
_canvas: randomCircleStyles[Math.floor(Math.random() * colorCount)].getCanvas()
4249
});
4350
}
44-
L.supermap.graphicGroup(graphics, {
51+
L.supermap.graphicLayer(graphics, {
4552
handleClick: function (graphic) {
4653
L.popup().setLatLng(graphic.getLatLng())
4754
.setContent('<p>经纬度是:<br>' + graphic.getLatLng().lng + ',<br>' + graphic.getLatLng().lat + '</p>')
4855
.openOn(map);
4956
}
5057
}).addTo(map);
5158
}
59+
60+
function getRandomColors(count) {
61+
return randomColor({
62+
luminosity: 'bright',
63+
hue: 'random',
64+
alpha: 0.5,
65+
format: 'rgba',
66+
count: count
67+
});
68+
}
5269
</script>
5370
</body>
5471
</html>

examples/leaflet/SummaryMeshJobService.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ <h4 class="modal-title">提示</h4>
4848
"<h3 class='panel-title'>点聚合分析</h3>" +
4949
"</div><div class='panel-body'>" +
5050
"<div class='input-group'><span class='input-group-addon'>输入数据<span title='必填字段' style='color: red;'> * </span> </span>" +
51-
"<input id='datasetName' type='text' class='form-control' value='samples_processing_newyorkPoint_P'/>" +
51+
"<input id='datasetName' type='text' class='form-control' value='samples_newyork_taxi_2013-01_14k'/>" +
5252
"</div><p><div class='input-group'>" +
5353
"<span class='input-group-addon'>聚合类型<span title='必填字段' style='color: red;'> * </span> </span>" +
5454
"<select class='form-control' id='type' name='clientType'>" +

examples/leaflet/echartsEffectScatter.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@
496496
}
497497
]
498498
};
499-
L.supermap.echartsMapLayer(option).addTo(map);
499+
L.supermap.echartsLayer(option).addTo(map);
500500
</script>
501501
</body>
502502
</html>

0 commit comments

Comments
 (0)