Skip to content

Commit 8c78ee4

Browse files
【feature】
【feature】【vue-leaflet】添加popup子组件范例 review by songym
1 parent 8e38cf8 commit 8c78ee4

File tree

7 files changed

+187
-63
lines changed

7 files changed

+187
-63
lines changed

dist/leaflet/iclient-leaflet-vue.js

Lines changed: 122 additions & 59 deletions
Large diffs are not rendered by default.

dist/leaflet/iclient-leaflet-vue.min.js

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

examples/component/config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,13 @@ var exampleConfig = {
430430
name: '地图子组件',
431431
name_en: 'Map subcomponent',
432432
content: [
433+
{
434+
name: '弹窗',
435+
name_en: 'Popup',
436+
version: '10.0.0',
437+
thumbnail: 'components_popup_vue.png',
438+
fileName: 'l_popup_vue'
439+
},
433440
{
434441
name: '点选查询',
435442
name_en: 'Identify',
38.6 KB
Loading
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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_componentsPopup_Vue"></title>
9+
<script type="text/javascript" include="vue" src="../js/include-web.js"></script>
10+
<script include="ant-design-vue,iclient-leaflet-vue" src="../../dist/leaflet/include-leaflet.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-web-map server-url="http://support.supermap.com.cn:8092/" map-id="676816598" @click="mapClick">
23+
<!-- 弹窗组件 -->
24+
<sm-popup>
25+
<a-table :columns="columns" :data-source="data" :pagination="false" />
26+
</sm-popup>
27+
</sm-web-map>
28+
</div>
29+
30+
<script>
31+
new Vue({
32+
el: '#main',
33+
data() {
34+
return {
35+
// table的props
36+
columns: [
37+
{ key: 1, title: '经度', dataIndex: 'lng' },
38+
{ key: 2, title: '纬度', dataIndex: 'lat' }
39+
],
40+
data: []
41+
};
42+
},
43+
methods: {
44+
mapClick(e) {
45+
let latLng = e.map.layerPointToLatLng(e.mapboxEvent.layerPoint);
46+
this.data = [{ key: 1, lng: latLng.lng.toFixed(2), lat: latLng.lat.toFixed(2) }];
47+
}
48+
}
49+
});
50+
</script>
51+
</body>
52+
</html>

examples/locales/en-US/resources.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@ window.examplesResources = {
599599
"title_componentsAnimateTextLayer_Vue": 'Animate Text Layer(Vue)',
600600
"title_componentsBorder_Vue": 'Border component',
601601
"title_componentsIdentify_Vue": 'Identify component(Vue)',
602+
"title_componentsPopup_Vue": 'Popup(Vue)',
602603
"title_componentsWebmap_React": 'iPortal Map component(React)',
603604
"title_componentsMap_React": 'iServer Map component(React)',
604605
"title_componentsRasterTile_React": 'Raster Layer component(React)',

examples/locales/zh-CN/resources.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ window.examplesResources = {
550550
"title_componentsTianditu_search_Vue": 'POI搜索',
551551
"title_componentsTianditu_switch_Vue": '天地图切换',
552552
"title_componentsTianditu_home_Vue": '天地图首页',
553+
"title_componentsPopup_Vue": '弹窗(Vue)',
553554
"title_componentsWebmap_React": 'iPortal地图',
554555
"title_componentsMap_React": 'iServer地图',
555556
"title_componentsRasterTile_React": '栅格图层组件',

0 commit comments

Comments
 (0)