Skip to content

Commit 823dc08

Browse files
2 parents 7520adb + 98f24a9 commit 823dc08

36 files changed

+2416
-10
lines changed

build/jsdocs/template/typeLinkExt.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ var typeLinks = {
5656
"L.Rectangle": lfapi + '#rectangle',
5757
'L.LatLngBounds': lfapi+ '#latlngbounds',
5858
'L.Map': lfapi + '#map-example',
59+
'L.Evented':lfapi +'#evented',
5960

6061
//mapboxgl
6162
"mapboxgl.Evented": mbglapi + '#Evented',

dist/mapboxgl/include-mapboxgl.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@
4949
function load() {
5050
var includes = (targetScript.getAttribute('include') || "").split(",");
5151
var excludes = (targetScript.getAttribute('exclude') || "").split(",");
52-
if (!inArray(excludes, 'mapbox-gl')) {
52+
if (!inArray(excludes, 'mapbox-gl') && !inArray(includes, 'mapbox-gl-enhance')) {
5353
inputCSS("http://iclient.supermap.io/web/libs/mapbox-gl-js/0.48.0/mapbox-gl.css");
5454
inputScript("http://iclient.supermap.io/web/libs/mapbox-gl-js/0.48.0/mapbox-gl.js");
5555
}
56+
if (inArray(includes, 'mapbox-gl-enhance')) {
57+
inputCSS("http://iclient.supermap.io/web/libs/mapbox-gl-js/0.48.0/mapbox-gl.css");
58+
inputScript("http://iclient.supermap.io/web/libs/mapbox-gl-js/enhancement/mapbox-gl-enhance.js");
59+
}
5660
if (inArray(includes, 'draw')) {
5761
inputCSS("http://iclient.supermap.io/web/libs/mapbox-gl-js/plugins/mapbox-gl-draw/1.0.9/mapbox-gl-draw.css");
5862
inputScript("http://iclient.supermap.io/web/libs/mapbox-gl-js/plugins/mapbox-gl-draw/1.0.9/mapbox-gl-draw.js");

examples/locales/en-US/resources.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ window.examplesResources = {
7878
"OGC": "OGC",
7979
"mapping": "Third Party Map",
8080
"others": "Others",
81-
"3D-WebGL": "3D-WebGL"
81+
"3D-WebGL": "3D-WebGL",
82+
"multiCoordSys": "Multi-coordinate System"
83+
8284
},
8385
"more": {
8486
"_name": "More>>",
@@ -330,6 +332,7 @@ window.examplesResources = {
330332
"title_measureArea": "Area Measurement Service",
331333
"title_measureDistance": "Distance Measurement Service",
332334
"title_tiledMapLayer": "3857 Coordinate System",
335+
"title_tiledMapLayer_4326": "4326 Coordinate System",
333336
"title_fieldService": "SuperMap Field Service",
334337
"title_fieldStatistics": "Dataset Field Statistics Service",
335338
"title_getGridCellInfos": "Data Grid Cell Query",
@@ -493,6 +496,7 @@ window.examplesResources = {
493496
"title_spatialAnalysis": 'Client Computation',
494497
"title_distributeAnalysis": 'Distribute Analysis',
495498
"title_dataServiceQuery": 'Data service query',
499+
"title_ChinaEarthquakeHeat": 'China Earthquake heatmap',
496500

497501

498502
"text_code": "Forward Match",

examples/locales/zh-CN/resources.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ window.examplesResources = {
5050
"OGC": "OGC",
5151
"mapping": "互联网地图",
5252
"others": "其他",
53-
"3D-WebGL": "3D-WebGL"
53+
"3D-WebGL": "3D-WebGL",
54+
"multiCoordSys": "多坐标系"
5455
}
5556
},
5657
"footer": {
@@ -274,6 +275,7 @@ window.examplesResources = {
274275
"title_measureArea": "面积测量",
275276
"title_measureDistance": "距离测量",
276277
"title_tiledMapLayer": "3857底图",
278+
"title_tiledMapLayer_4326": "4326底图",
277279
"title_fieldService": "SuperMap 字段信息",
278280
"title_fieldStatistics": "字段查询统计",
279281
"title_getGridCellInfos": "栅格查询",
@@ -442,6 +444,7 @@ window.examplesResources = {
442444
"title_flyBird":"飞鸟模型",
443445
"title_buildings":"建筑模型",
444446
"title_facility":"设施点(mtl+obj格式)",
447+
"title_ChinaEarthquakeHeat": '中国地震数据热力图',
445448

446449
"text_code": "正向匹配",
447450
"text_decode": "反向匹配",
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<!--********************************************************************
2+
* Copyright© 2000 - 2018 SuperMap Software Co.Ltd. All rights reserved.
3+
*********************************************************************-->
4+
<!DOCTYPE html>
5+
<html>
6+
<head>
7+
<meta charset='utf-8' />
8+
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
9+
<title data-i18n="resources.title_tiledMapLayer_4326"></title>
10+
<script type="text/javascript" src="../js/include-web.js"></script>
11+
<script type="text/javascript" include="mapbox-gl-enhance" src="../../dist/mapboxgl/include-mapboxgl.js"></script>
12+
<style>
13+
body {
14+
margin: 0;
15+
padding: 0;
16+
}
17+
18+
#map {
19+
position: absolute;
20+
top: 0;
21+
bottom: 0;
22+
width: 100%;
23+
}
24+
</style>
25+
</head>
26+
27+
<body>
28+
<div id='map'></div>
29+
<script type="text/javascript">
30+
var map = new mapboxgl.Map({
31+
container: 'map', // container id
32+
style: {
33+
"version": 8,
34+
"sources": {
35+
"raster-tiles": {
36+
"type": "raster",
37+
"tileSize": 256,
38+
//xyz形式,原生支持
39+
//"tiles": ['http://t0.tianditu.com/DataServer?T=vec_c&x={x}&y={y}&l={z}'],
40+
41+
42+
//iserver image资源模板;扩展支持
43+
//"tiles": ['http://localhost:8090/iserver/services/map-World/rest/maps/World/image.png?viewBounds={viewBounds}&width={width}&height={height}'],
44+
45+
46+
//iserver tileimage资源模板;扩展支持
47+
//"tiles": ['http://iclsvr.supermap.io/iserver/services/map-jingjin/rest/maps/%E4%BA%AC%E6%B4%A5%E5%9C%B0%E5%8C%BA%E5%9C%B0%E5%9B%BE/tileimage.png?scale={scale}&x={x}&y={y}&width={width}&height={height}&origin={"x":-180,"y":90}'],
48+
49+
50+
//推荐; iserver tileimage资源;扩展支持
51+
//参数列表:地图服务地址(到地图名)必填 ; rasterSource为"iserver";必填; transparent:可选,默认为true
52+
"tiles": ['http://iclsvr.supermap.io/iserver/services/map-world/rest/maps/World'],
53+
"rasterSource":"iserver"
54+
55+
56+
}
57+
},
58+
59+
"layers": [{
60+
"id": "simple-tiles",
61+
"type": "raster",
62+
"source": "raster-tiles",
63+
"minzoom": 0,
64+
"maxzoom": 22
65+
}]
66+
},
67+
units:'degree',
68+
crs:'EPSG:4326',// 或者 mapboxgl.CRS.EPSG4326 或者 new mapboxgl.CRS('EPSG:4326',[-180,-90,180,90]);
69+
center: [0, 0],
70+
zoom: 2
71+
});
72+
map.on('load', function () {
73+
//从 iServer 查询
74+
var idsParam = new SuperMap.GetFeaturesByIDsParameters({
75+
IDs: [247],
76+
datasetNames: ["World:Countries"]
77+
});
78+
var service = new mapboxgl.supermap.FeatureService(
79+
"http://iclsvr.supermap.io/iserver/services/data-world/rest/data");
80+
service.getFeaturesByIDs(idsParam, function (serviceResult) {
81+
map.addSource("queryDatas", {
82+
"type": "geojson",
83+
"data": serviceResult.result.features
84+
});
85+
map.addLayer({
86+
"id": "queryDatas",
87+
"type": "fill",
88+
"source": "queryDatas",
89+
"paint": {
90+
"fill-color": "#008080",
91+
"fill-opacity": 0.4
92+
},
93+
"filter": ["==", "$type", "Polygon"]
94+
});
95+
96+
});
97+
map.addControl(new mapboxgl.NavigationControl());
98+
});
99+
100+
101+
</script>
102+
103+
</body>
104+
105+
</html>

examples/mapboxgl/config.js

Lines changed: 141 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,144 @@ var exampleConfig = {
839839
}
840840
}
841841
},
842+
"multiCoordSys": {
843+
name: "多坐标系",
844+
name_en: "Multi-coordinate System",
845+
version: "9.1.1",
846+
// localIgnore: true,
847+
content: {
848+
"Multi_coordinate_Map":{
849+
name:"地图",
850+
name_en:"Map service",
851+
version: "9.1.1",
852+
content: [{
853+
name: "4326底图",
854+
name_en: "4326 Coordinate system",
855+
version: "9.1.1",
856+
thumbnail: "01_tiledMapLayer_4326.png",
857+
fileName: "01_tiledMapLayer_4326"
858+
},{
859+
name: "绘图控件_4326",
860+
name_en: "Draw control 4326",
861+
version: "9.1.1",
862+
thumbnail: "control_drawControl_4326.png",
863+
fileName: "control_drawControl_4326"
864+
},{
865+
name: "矢量瓦片_4326",
866+
name_en: "Mvt 4326",
867+
version: "9.1.1",
868+
thumbnail: "mvt_4326.png",
869+
fileName: "mvtVectorTile_4326"
870+
}]
871+
},
872+
"Multi_coordinate_cluster": {
873+
name: "聚合",
874+
name_en: "Cluster",
875+
version: "9.1.1",
876+
content: [{
877+
name: "点聚合_3857",
878+
name_en: "Marker cluster 3857",
879+
version: "9.1.1",
880+
thumbnail: "markerCluster_3857.png",
881+
fileName: "markerCluster_3857"
882+
}, {
883+
name: "点聚合_4326",
884+
name_en: "Marker cluster 4326",
885+
version: "9.1.1",
886+
thumbnail: "markerCluster_4326.png",
887+
fileName: "markerCluster_4326"
888+
}]
889+
},
890+
"Multi_coordinate_DeckGL": {
891+
name: "DeckGL",
892+
name_en: "DeckGL",
893+
version: "9.1.1",
894+
content: [{
895+
name: "路径图(线)",
896+
name_en: "Path",
897+
version: "9.1.1",
898+
thumbnail: "deckglLayer_pathLayer_4326.png",
899+
fileName: "deckglLayer_pathLayer_4326"
900+
}]
901+
},
902+
"Multi_coordinate_ECharts": {
903+
name: "ECharts",
904+
name_en: "ECharts",
905+
version: "9.1.1",
906+
content: [{
907+
name: "迁徙图",
908+
name_en: "Mock migration",
909+
version: "9.1.1",
910+
thumbnail: "echarts_geoline_4326.png",
911+
fileName: "echarts_geoline_4326"
912+
}, {
913+
name: "微博签到图",
914+
name_en: "Scatter of Weibo user",
915+
version: "9.1.1",
916+
thumbnail: "echarts_scatterWeibo_4326.png",
917+
fileName: "echarts_scatterWeibo_4326"
918+
}, {
919+
name: "全国铁路网络图(400万点数据绘制)",
920+
name_en: "Use lines to draw 4 millions Chinese railways",
921+
localIgnore: true,
922+
version: "9.1.1",
923+
thumbnail: "echarts_linesDrawMillionsRailwaysNetwork_4326.png",
924+
fileName: "echarts_linesDrawMillionsRailwaysNetwork_4326"
925+
}]
926+
},
927+
"Multi_coordinate_graphicLayer": {
928+
name: "高效率点图层",
929+
name_en: "High efficiency point layer",
930+
version: "9.1.1",
931+
content: [
932+
{
933+
name: "纽约出租车145万上车点",
934+
name_en: "Points of 1.45 million NYC taxis",
935+
version: "9.1.1",
936+
thumbnail: "graphicLayer_4326.png",
937+
fileName: "graphicLayer_4326"
938+
}
939+
]
940+
},
941+
"Multi_coordinate_heatMap": {
942+
name: "热力图",
943+
name_en: "Heat map",
944+
version: "9.1.1",
945+
content: [{
946+
name: "中国地震数据",
947+
name_en: "China Earthquake Data",
948+
version: "9.1.1",
949+
thumbnail: "heatMapLayer_earthQuake_4326.png",
950+
fileName: "earthquakeHeatMap"
951+
},
952+
{
953+
name: "中国地震数据_iClient",
954+
name_en: "China Earthquake Data",
955+
version: "9.1.1",
956+
thumbnail: "heatMapLayer_earthQuake_iclient_4326.png",
957+
fileName: "earthquakeHeatMapIclient"
958+
}]
959+
},
960+
"Multi_coordinate_MapV": {
961+
name: "MapV",
962+
name_en: "MapV",
963+
version: "9.1.1",
964+
content: [{
965+
name: "通勤图",
966+
name_en: "OD",
967+
version: "9.1.1",
968+
thumbnail: "mapvCsvcar_4326.png",
969+
fileName: "mapvCsvcar_4326"
970+
},{
971+
name: "面",
972+
name_en: "Simple polygon",
973+
version: "9.1.1",
974+
thumbnail: "mapvLayerPolyon_4326.png",
975+
fileName: "mapvLayerPolyon_4326"
976+
}]
977+
}
978+
}
979+
},
842980
"GTC": {
843981
name: "GTC",
844982
name_en: "GTC",
@@ -869,6 +1007,7 @@ var sideBarIconConfig = {
8691007
"iServer": "fa-server",
8701008
"viz": "fa-map",
8711009
"control": "fa-sliders",
1010+
"multiCoordSys": "fa-globe",
8721011
"GTC": "fa-globe"
8731012
};
8741013

@@ -880,6 +1019,7 @@ var sideBarIconConfig = {
8801019
var exampleIconConfig = {
8811020
"iServer": "fa-server",
8821021
"viz": "fa-map",
883-
"GTC": "fa-globe"
1022+
"GTC": "fa-globe",
1023+
'multiCoordSys':"fa-globe",
8841024
};
8851025
window.mapboxglExampleConfig = exampleConfig;

0 commit comments

Comments
 (0)