Skip to content

Commit 6ce0945

Browse files
committed
新增leaflet和ol下散点增量图示例。review by songyumeng.
1 parent f2b1a3a commit 6ce0945

23 files changed

+259
-19
lines changed

dist/iclient9-openlayers.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33695,10 +33695,9 @@ var MapExtend = exports.MapExtend = function () {
3369533695
var coordinate = this.getCoordinateFromPixel(pixel);
3369633696
for (var i = 0; i < layers.length; i++) {
3369733697
if (layerFilter.call(null, layers[i]) && layers[i].getSource()._forEachFeatureAtCoordinate) {
33698-
return layers[i].getSource()._forEachFeatureAtCoordinate(coordinate, resolution, callback, pixel);
33698+
layers[i].getSource()._forEachFeatureAtCoordinate(coordinate, resolution, callback, pixel);
3369933699
}
3370033700
}
33701-
3370233701
return this.forEachFeatureAtPixelDefault(pixel, callback, opt_options);
3370333702
};
3370433703
}();
@@ -66154,7 +66153,7 @@ module.exports = function (proj4) {
6615466153
/* 338 */
6615566154
/***/ (function(module) {
6615666155

66157-
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":"F:\\dev\\iClient","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"};
66156+
module.exports = {"_args":[["proj4@2.3.15","G:\\iClient9"]],"_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":"http://registry.npm.taobao.org/proj4/download/proj4-2.3.15.tgz","_spec":"2.3.15","_where":"G:\\iClient9","author":"","bugs":{"url":"https://github.com/proj4js/proj4js/issues"},"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"},"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"};
6615866157

6615966158
/***/ }),
6616066159
/* 339 */

dist/iclient9-openlayers.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/leaflet/config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,11 @@ var exampleConfig = {
691691
name_en: "Use lines to draw 25 millions Chinese roads",
692692
thumbnail: "l_echartsLinesMillionsRoads.png",
693693
fileName: "echarts_linesDrawMillionsRoadsNetwork_50WFeatures"
694+
}, {
695+
name: "1百40万数据绘制纽约出租车分布图",
696+
name_en: "Use scatter to draw 1.4 millions New York Taxi Points",
697+
thumbnail: "l_echartScatterMillionsNewYorkTaxi.png",
698+
fileName: "echarts_scatterDrawMillionsNewYorkTaxiPoints"
694699
}
695700
]
696701

examples/leaflet/echarts_linesDrawMillionsBeijingRoadsNetwork.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
if (idx > CHUNK_COUNT) {
7171
return;
7272
}
73-
var dataURL = `http://iclient.supermap.io/web/data/bigdata_beijingroads/bigDta_${idx}.bin`;
73+
var dataURL = `http://iclient.supermap.io/web/data/bigdata_beijingroads/data_${idx}.bin`;
7474
var xhr = new XMLHttpRequest();
7575
xhr.open('GET', dataURL, true);
7676
xhr.responseType = 'arraybuffer';

examples/leaflet/echarts_linesDrawMillionsRailwaysNetwork.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
if (idx > CHUNK_COUNT) {
7171
return;
7272
}
73-
var dataURL = `http://iclient.supermap.io/web/data/bigdata_railway_10w/bigDta_${idx}.bin`;
73+
var dataURL = `http://iclient.supermap.io/web/data/bigdata_railway_10w/data_${idx}.bin`;
7474
var xhr = new XMLHttpRequest();
7575
xhr.open('GET', dataURL, true);
7676
xhr.responseType = 'arraybuffer';

examples/leaflet/echarts_linesDrawMillionsRoadsNetwork_50WFeatures.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
if (idx > CHUNK_COUNT) {
7171
return;
7272
}
73-
var dataURL = `http://iclient.supermap.io/web/data/bigdata_roads_50w/bigDta_${idx}.bin`;
73+
var dataURL = `http://iclient.supermap.io/web/data/bigdata_roads_50w/data_${idx}.bin`;
7474
var xhr = new XMLHttpRequest();
7575
xhr.open('GET', dataURL, true);
7676
xhr.responseType = 'arraybuffer';

examples/leaflet/echarts_linesDrawMillionsWaterSystem.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
if (idx > CHUNK_COUNT) {
7171
return;
7272
}
73-
var dataURL = `http://iclient.supermap.io/web/data/bigdata_water_10w/bigDta_${idx}.bin`;
73+
var dataURL = `http://iclient.supermap.io/web/data/bigdata_water_10w/data_${idx}.bin`;
7474
var xhr = new XMLHttpRequest();
7575
xhr.open('GET', dataURL, true);
7676
xhr.responseType = 'arraybuffer';
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<html>
2+
<head>
3+
<meta charset='utf-8'/>
4+
<title>1.4 millions New York Taxi Points</title>
5+
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no'/>
6+
<script type="text/javascript" include="jquery" src="../js/include-web.js"></script>
7+
<script type="text/javascript" include="echarts" src="../../dist/include-leaflet.js"></script>
8+
<style>
9+
body {
10+
margin: 0;
11+
padding: 0;
12+
}
13+
14+
#map {
15+
position: absolute;
16+
top: 0;
17+
bottom: 0;
18+
width: 100%;
19+
}
20+
</style>
21+
</head>
22+
<body>
23+
<div id='map'></div>
24+
<script type="text/javascript">
25+
var host = window.isLocal ? window.server : "http://support.supermap.com.cn:8090";
26+
var tileURL = host + "/iserver/services/map-china400/rest/maps/ChinaDark";
27+
28+
var map = L.map('map', {
29+
center: [40.765654, -73.931577],
30+
maxZoom: 18,
31+
zoom: 12
32+
});
33+
L.supermap.tiledMapLayer(tileURL).addTo(map);
34+
35+
var option = {
36+
title: {
37+
top: '10px',
38+
text: resources.text_echartsLinesMillions_nyTaxi,
39+
subtext: resources.text_echartsLinesMillions_nyTaxi_subtext,
40+
left: 'center',
41+
textStyle: {
42+
color: '#fff'
43+
},
44+
subtextStyle: {
45+
color: '#fff'
46+
}
47+
},
48+
series: [{
49+
type: 'scatter',
50+
progressive: 1e5,
51+
coordinateSystem: 'leaflet',
52+
symbolSize: 0.5,
53+
blendMode: 'lighter',
54+
large: true,
55+
itemStyle: {
56+
color: '#FF3300'
57+
},
58+
postEffect: {
59+
enable: true
60+
},
61+
silent: true,
62+
dimensions: ['lng', 'lat'],
63+
data: new Float32Array()
64+
}]
65+
};
66+
67+
var echartsLayer = L.supermap.echartsLayer(option).addTo(map);
68+
var CHUNK_COUNT = 19;
69+
70+
function fetchData(idx) {
71+
if (idx >= CHUNK_COUNT) {
72+
return;
73+
}
74+
var dataURL = `http://iclient.supermap.io/web/data/bigdata_nytaxi/data_${idx}.bin`;
75+
// var dataURL = `../mapboxgl/resultData_NY/bigData_${idx}.bin`;
76+
var xhr = new XMLHttpRequest();
77+
xhr.open('GET', dataURL, true);
78+
xhr.responseType = 'arraybuffer';
79+
80+
xhr.onload = function (e) {
81+
var rawData = new Float32Array(this.response);
82+
echartsLayer._ec
83+
.appendData({
84+
seriesIndex: 0,
85+
data: rawData
86+
});
87+
88+
fetchData(idx + 1);
89+
};
90+
91+
xhr.send();
92+
}
93+
94+
fetchData(0);
95+
96+
</script>
97+
</body>
98+
</html>

examples/locales/en-US/resources.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,8 @@ window.resources = {
10931093
"text_echartsLinesMillions_roads_subtext": "drawn by 25 million points",
10941094
"text_graphicLayer_title": "Boarding points of NYC taxis",
10951095
"text_graphicLayer_subTitle": "1.45 million points",
1096+
"text_echartsLinesMillions_nyTaxi": "New York taxi map",
1097+
"text_echartsLinesMillions_nyTaxi_subtext": "drawn by 1.4 million points",
10961098

10971099
"btn_overlayAnalyst": "Start analysis",
10981100
"btn_terrainCurvatureCalculation": "Start calculation",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy