Skip to content

Commit a671ce7

Browse files
新增 GeojsonLayer范例 review by songym
1 parent 23f23e5 commit a671ce7

6 files changed

+1059
-728
lines changed

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

Lines changed: 13 additions & 29 deletions
Large diffs are not rendered by default.

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

Lines changed: 951 additions & 692 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: 1 addition & 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: 11 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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_widgetsRaster_Vue"></title>
9+
<script type="text/javascript" include="vue,jquery,papaparse" src="../js/include-web.js"></script>
10+
<script
11+
include="iclient9-mapboxgl-widgets-vue,mapbox-gl-enhance"
12+
src="../../dist/mapboxgl/include-mapboxgl.js"
13+
></script>
14+
<style>
15+
#main {
16+
margin: 0 auto;
17+
width: 100%;
18+
height: 100%;
19+
}
20+
</style>
21+
</head>
22+
23+
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
24+
<div id="main">
25+
<sm-map :map-options="mapOptions">
26+
<sm-geojson-layer :layer-style="layerStyle" :data="data"></sm-geojson-layer>
27+
<sm-layer-list position="top-left"></sm-layer-list>
28+
</sm-map>
29+
</div>
30+
<script>
31+
let data;
32+
$.get("../data/全国671个气象站观测数据.geojson", function(res) {
33+
data = res;
34+
new Vue({
35+
el: "#main",
36+
data() {
37+
var host = window.isLocal ? window.server : "http://support.supermap.com.cn:8090";
38+
var attribution =
39+
"<a href='https://www.mapbox.com/about/maps/' target='_blank'>© Mapbox </a>" +
40+
" with <span>© <a href='http://iclient.supermap.io' target='_blank'>SuperMap iClient</a> | </span>" +
41+
" Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> ";
42+
return {
43+
data: data,
44+
layerStyle: new SuperMap.Widgets.commontypes.CircleStyle({
45+
"circle-color": "#3fb1e3",
46+
"circle-radius": 6
47+
}),
48+
mapOptions: {
49+
container: "map", // container id
50+
style: {
51+
version: 8,
52+
sources: {
53+
"raster-tiles": {
54+
attribution: attribution,
55+
type: "raster",
56+
tiles: [
57+
host +
58+
"/iserver/services/map-china400/rest/maps/ChinaDark/zxyTileImage.png?z={z}&x={x}&y={y}"
59+
],
60+
tileSize: 256
61+
}
62+
},
63+
layers: [
64+
{
65+
id: "simple-tiles",
66+
type: "raster",
67+
source: "raster-tiles",
68+
minzoom: 0,
69+
maxzoom: 22
70+
}
71+
]
72+
},
73+
center: [120.143, 30.236],
74+
zoom: 3
75+
}
76+
};
77+
}
78+
});
79+
});
80+
</script>
81+
</body>
82+
</html>

examples/mapboxgl/widgets_openfile_vue.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
type: "raster",
5858
tiles: [
5959
host +
60-
"/iserver/services/map-china400/rest/maps/China/zxyTileImage.png?z={z}&x={x}&y={y}"
60+
"/iserver/services/map-china400/rest/maps/ChinaDark/zxyTileImage.png?z={z}&x={x}&y={y}"
6161
],
6262
tileSize: 256
6363
}

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