Skip to content

Commit ecbb50c

Browse files
新增打开文件例子 review by songym
1 parent 4d2af35 commit ecbb50c

File tree

10 files changed

+38581
-3297
lines changed

10 files changed

+38581
-3297
lines changed

dist/mapboxgl/iclient9-mapboxgl-widgets-vue.css

Lines changed: 66 additions & 0 deletions
Large diffs are not rendered by default.

dist/mapboxgl/iclient9-mapboxgl-widgets-vue.js

Lines changed: 38399 additions & 3284 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mapboxgl/iclient9-mapboxgl-widgets-vue.min.css

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

dist/mapboxgl/iclient9-mapboxgl-widgets-vue.min.js

Lines changed: 15 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/locales/en-US/resources.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ window.examplesResources = {
525525
"title_ChinaEarthquakeHeatClient": 'China Earthquake(Classic) WGS84',
526526
"title_widgetsChart_Vue": 'Chart Widget(Vue)',
527527
"title_widgetsLayerList_Vue": 'LayerList Widget(Vue)',
528+
"title_widgetsOpenFile_Vue":'OpenFile Widget(Vue)',
528529
"title_widgetsMap_Vue": 'Map Widget(Vue)',
529530
"title_widgetsMiniMap_Vue": 'MiniMap Widget(Vue)',
530531
"title_widgetsPan_Vue": 'Pan Widget(Vue)',

examples/locales/zh-CN/resources.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ window.examplesResources = {
473473
"title_ChinaEarthquakeHeatClient": '中国地震数据(Classic)_WGS84',
474474
"title_widgetsChart_Vue": '图表微件(Vue)',
475475
"title_widgetsLayerList_Vue": '图层列表微件(Vue)',
476+
"title_widgetsOpenFile_Vue":'打开文件微件(Vue)',
476477
"title_widgetsMap_Vue": '地图微件(Vue)',
477478
"title_widgetsMiniMap_Vue": '鹰眼微件(Vue)',
478479
"title_widgetsPan_Vue": '平移微件(Vue)',

examples/mapboxgl/config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,6 +1240,12 @@ var exampleConfig = {
12401240
version: "9.1.2",
12411241
thumbnail: "widgets_deckgl_vue.png",
12421242
fileName: "widgets_deckgl_vue"
1243+
},{
1244+
name: "打开文件",
1245+
name_en: "Open File",
1246+
version: "9.1.2",
1247+
thumbnail: "widgets_openfile_vue.png",
1248+
fileName: "widgets_openfile_vue"
12431249
}
12441250
]
12451251
}
49.9 KB
Loading
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<!--********************************************************************
2+
* Copyright© 2000 - 2019 SuperMap Software Co.Ltd. All rights reserved.
3+
*********************************************************************-->
4+
<!DOCTYPE html>
5+
<html>
6+
<head>
7+
<meta charset="UTF-8" />
8+
<title data-i18n="resources.title_widgetsOpenFile_Vue"></title>
9+
<script type="text/javascript" include="vue" src="../js/include-web.js"></script>
10+
<script include="iclient9-mapboxgl-widgets-vue" src="../../dist/mapboxgl/include-mapboxgl.js"></script>
11+
<style>
12+
#main {
13+
margin: 0 auto;
14+
width: 100%;
15+
height: 100%;
16+
}
17+
</style>
18+
</head>
19+
20+
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
21+
<div id="main">
22+
<sm-map :map-options="mapOptions">
23+
<sm-open-file :layer-styles="layerStyles"></sm-open-file>
24+
</sm-map>
25+
</div>
26+
<script>
27+
new Vue({
28+
el: "#main",
29+
data() {
30+
var host = window.isLocal ? window.server : "http://support.supermap.com.cn:8090";
31+
var attribution =
32+
"<a href='https://www.mapbox.com/about/maps/' target='_blank'>© Mapbox </a>" +
33+
" with <span>© <a href='http://iclient.supermap.io' target='_blank'>SuperMap iClient</a> | </span>" +
34+
" Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> ";
35+
return {
36+
layerStyles: {
37+
line: new SuperMap.Widgets.commontypes.LineStyle({
38+
"line-width": 3,
39+
"line-color": "#3fb1e3"
40+
}),
41+
circle: new SuperMap.Widgets.commontypes.CircleStyle({
42+
"circle-color": "#3fb1e3",
43+
"circle-radius": 6
44+
}),
45+
fill: new SuperMap.Widgets.commontypes.FillStyle({
46+
"fill-color": "#3fb1e3",
47+
"fill-opacity": 0.8
48+
})
49+
},
50+
mapOptions: {
51+
container: "map", // container id
52+
style: {
53+
version: 8,
54+
sources: {
55+
"raster-tiles": {
56+
attribution: attribution,
57+
type: "raster",
58+
tiles: [
59+
host +
60+
"/iserver/services/map-china400/rest/maps/China/zxyTileImage.png?z={z}&x={x}&y={y}"
61+
],
62+
tileSize: 256
63+
}
64+
},
65+
layers: [
66+
{
67+
id: "simple-tiles",
68+
type: "raster",
69+
source: "raster-tiles",
70+
minzoom: 0,
71+
maxzoom: 22
72+
}
73+
]
74+
},
75+
center: [120.143, 30.236],
76+
zoom: 3
77+
}
78+
};
79+
}
80+
});
81+
</script>
82+
</body>
83+
</html>

examples/mapboxgl/widgets_raster_vue.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@
3737
name: resources.text_myRasterLayer,
3838
opacity: 0.8,
3939
visible: true,
40-
tiles: [
41-
host +
42-
'/iserver/services/map-china400/rest/maps/China/zxyTileImage.png?z={z}&x={x}&y={y}',
43-
],
44-
mapUrl: host + '/iserver/services/map-china400/rest/maps/China',
40+
mapUrl: host + '/iserver/services/map-Population/rest/maps/PopulationDistribution',
4541
},
4642
};
4743
},

0 commit comments

Comments
 (0)