Skip to content

Commit 39e11cd

Browse files
committed
【example】新增EPSG2362坐标系例子
1 parent fbad17b commit 39e11cd

File tree

7 files changed

+64
-8
lines changed

7 files changed

+64
-8
lines changed

dist/mapboxgl/include-mapboxgl.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
inputScript(`${libsurl}/mapbox-gl-js/1.13.2/mapbox-gl.js`);
5858
}
5959
if (inArray(includes, 'mapbox-gl-enhance')) {
60-
inputCSS(`${libsurl}/mapbox-gl-js-enhance/1.12.0-1/mapbox-gl-enhance.css`);
61-
inputScript(`${libsurl}/mapbox-gl-js-enhance/1.12.0-1/mapbox-gl-enhance.js`);
60+
inputCSS(`${libsurl}/mapbox-gl-js-enhance/1.12.1/mapbox-gl-enhance.css`);
61+
inputScript(`${libsurl}/mapbox-gl-js-enhance/1.12.1/mapbox-gl-enhance.js`);
6262
}
6363
if (inArray(includes, 'turf')) {
6464
inputScript(`${libsurl}/turf/6.5.0/turf.min.js`);

examples/js/include-web.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,6 @@
171171
inputScript(`${libsurl}/iclient8c/examples/js/plottingPanel/colorpicker/js/colorpicker.js`);
172172
inputCSS(`${libsurl}/iclient8c/examples/js/plottingPanel/colorpicker/css/colorpicker.css`);
173173
}
174-
if (inArray(includes, 'pako')) {
175-
inputScript(`${libsurl}/pako/1.0.6/pako_inflate.js`);
176-
inputScript(`${libsurl}/pako/1.0.6/pako.min.js`);
177-
}
178174
}
179175

180176
function datGuiI18N() {

examples/leaflet/plot_dynamicPlot.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@
275275
<div id="contentMe" style="width:100px;background-color:#f4f4f4;box-shadow:3px 3px 3px rgba(0,0,0,0.5);position:absolute;z-index:1000; top:20px;left:100px;display:none;text-align:center;">
276276
<a href="javascript:void(0)" id="paste" style="border-bottom:1px solid #ccc;display:block;line-height:20px;color:#000; font-size:16px;">粘贴此处</a>
277277
</div>
278-
<script type="text/javascript" include="plottingPanel,pako" src="../js/include-web.js"></script>
278+
<script type="text/javascript" include="plottingPanel" src="../js/include-web.js"></script>
279279
<script type="text/javascript" include="iclient-plot-leaflet" src="../../dist/leaflet/include-leaflet.js"></script>
280280
<script type="text/javascript" include="PlotPanel,StylePanel" src="../js/plottingPanel/PlottingPanel.Include.js"></script>
281281
<script type="text/javascript">

examples/leaflet/plot_operatePlottingLayer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ <h5 class='panel-title text-center' data-i18n="resources.title_operatePlottingLa
4646
</div>
4747
<div id="map" style="margin:0 auto;width: 100%;height: 100%">
4848
</div>
49-
<script type="text/javascript" include="bootstrap,widgets.alert,plottingPanel,pako" src="../js/include-web.js"></script>
49+
<script type="text/javascript" include="bootstrap,widgets.alert,plottingPanel" src="../js/include-web.js"></script>
5050
<script type="text/javascript" include="leaflet,iclient-leaflet,iclient-leaflet-css,iclient-plot-leaflet" src="../../dist/leaflet/include-leaflet.js"></script>
5151
<script type="text/javascript" include="PlotPanel,StylePanel,PlotMapPanel" src="../js/plottingPanel/PlottingPanel.Include.js"></script>
5252
<script type="text/javascript">

examples/mapboxgl/config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,13 @@ var exampleConfig = {
12301230
thumbnail: 'mvt_4326.png',
12311231
fileName: 'mvtVectorTile_4326'
12321232
},
1233+
{
1234+
name: '矢量瓦片_EPSG2362',
1235+
name_en: 'MVT EPSG2362',
1236+
version: '11.1.0',
1237+
thumbnail: 'mvtvectorlayer_mbstyle_landuse.png',
1238+
fileName: 'mvtVectorTile_2362'
1239+
},
12331240
{
12341241
name: '地图打印',
12351242
name_en: 'Map Print',
19.7 KB
Loading
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!--********************************************************************
2+
* Copyright© 2000 - 2022 SuperMap Software Co.Ltd. All rights reserved.
3+
*********************************************************************-->
4+
<!DOCTYPE html>
5+
<html>
6+
7+
<head>
8+
<meta charset='utf-8' />
9+
<title data-i18n="resources.title_mvtVectorLayer4326"></title>
10+
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
11+
<style>
12+
body {
13+
margin: 0;
14+
padding: 0;
15+
}
16+
17+
#map {
18+
position: absolute;
19+
top: 0;
20+
bottom: 0;
21+
width: 100%;
22+
}
23+
</style>
24+
</head>
25+
26+
<body>
27+
<div id='map'></div>
28+
<script type="text/javascript" include="jquery" src="../js/include-web.js"></script>
29+
<script type="text/javascript" include="mapbox-gl-enhance" src="../../dist/mapboxgl/include-mapboxgl.js"></script>
30+
<script type="text/javascript">
31+
var host = (window.isLocal ? window.server : "https://iserver.supermap.io");
32+
var WKT = 'PROJCS["Xian 1980 / 3-degree Gauss-Kruger zone 38",GEOGCS["Xian 1980",DATUM["Xian_1980",SPHEROID["IAG 1975",6378140,298.257,AUTHORITY["EPSG","7049"]],AUTHORITY["EPSG","6610"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4610"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",114],PARAMETER["scale_factor",1],PARAMETER["false_easting",38500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","2362"]]'
33+
var map = new mapboxgl.Map({
34+
container: 'map',
35+
style: host+'/iserver/services/map-mvt-landuse/rest/maps/landuse/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true&tileURLTemplate=ZXY',
36+
// mapboxgl.CRS(name,wkt,extent);
37+
// name:坐标系名称,必填
38+
// wkt:坐标系的WKT或者Proj4表述,必填。
39+
// extent: 当前坐标系范围,[左,下,右,上]
40+
crs: new mapboxgl.CRS('EPSG:2362', WKT, [32876993.777095847, -10001970.421227315, 52880934.61955048, 10001970.421227315]),
41+
center: [108.9118776, 23.8260365],
42+
zoom: 13,
43+
renderWorldCopies: false,
44+
45+
});
46+
new mapboxgl.Marker().setLngLat([108.9131417, 23.826245]).addTo(map);
47+
map.addControl(new mapboxgl.NavigationControl());
48+
49+
</script>
50+
51+
</body>
52+
53+
</html>

0 commit comments

Comments
 (0)