Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
SuperMan
Commits
ce43791c
Commit
ce43791c
authored
Sep 13, 2023
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
ee990886
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
tripmap.vue
...omponents/newTravelmanager/TravelGroupControl/tripmap.vue
+11
-7
No files found.
src/components/newTravelmanager/TravelGroupControl/tripmap.vue
View file @
ce43791c
...
@@ -151,7 +151,6 @@ export default {
...
@@ -151,7 +151,6 @@ export default {
},
},
dataAll
:
{
dataAll
:
{
handler
(
val
,
oldVal
)
{
handler
(
val
,
oldVal
)
{
// console.log(val,'-------')
if
(
this
.
NationList
.
length
==
0
)
this
.
getAddress
(
1
);
if
(
this
.
NationList
.
length
==
0
)
this
.
getAddress
(
1
);
if
(
val
.
TripMapList
.
length
==
0
)
this
.
SearchCity
(
2
);
if
(
val
.
TripMapList
.
length
==
0
)
this
.
SearchCity
(
2
);
if
(
val
.
TripMapList
.
length
>
0
)
{
if
(
val
.
TripMapList
.
length
>
0
)
{
...
@@ -192,7 +191,12 @@ export default {
...
@@ -192,7 +191,12 @@ export default {
},
},
computed
:
{},
computed
:
{},
mounted
()
{
mounted
()
{
this
.
map
=
new
mapboxgl
.
Map
({
this
.
initMap
()
},
methods
:
{
// 初始化地图
initMap
(){
this
.
map
=
new
mapboxgl
.
Map
({
container
:
"trip_map"
,
container
:
"trip_map"
,
style
:
"mapbox://styles/alex9012/clm92pvs1011j01qzexlh6g2b"
,
// 'mapbox://styles/mapbox/light-v9','mapbox://styles/alex9012/clm92pvs1011j01qzexlh6g2b'
style
:
"mapbox://styles/alex9012/clm92pvs1011j01qzexlh6g2b"
,
// 'mapbox://styles/mapbox/light-v9','mapbox://styles/alex9012/clm92pvs1011j01qzexlh6g2b'
center
:
[
2.177432
,
41.382894
],
center
:
[
2.177432
,
41.382894
],
...
@@ -232,10 +236,7 @@ export default {
...
@@ -232,10 +236,7 @@ export default {
}
}
});
});
//this.addDocumentEventListener();
//this.addDocumentEventListener();
},
// this.initializeData()
},
methods
:
{
// 导出地图片
// 导出地图片
getResultImg
()
{
getResultImg
()
{
this
.
setLoading
=
true
this
.
setLoading
=
true
...
@@ -323,6 +324,7 @@ export default {
...
@@ -323,6 +324,7 @@ export default {
await
this
.
addCountriesMaker
();
//标记名字
await
this
.
addCountriesMaker
();
//标记名字
}
}
},
},
// 获取国家
async
getAddress
(
Type
)
{
async
getAddress
(
Type
)
{
this
.
loading
=
true
;
this
.
loading
=
true
;
await
this
.
apipost
(
await
this
.
apipost
(
...
@@ -378,6 +380,7 @@ export default {
...
@@ -378,6 +380,7 @@ export default {
getColorStr
(){
getColorStr
(){
this
.
dataAll
.
TripMapList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
TripMapList
));
this
.
dataAll
.
TripMapList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
TripMapList
));
},
},
// 城市ids
getCityListIds
(
x
,
index
)
{
getCityListIds
(
x
,
index
)
{
x
.
CityList
=
[];
x
.
CityList
=
[];
let
obj
=
{
let
obj
=
{
...
@@ -412,6 +415,7 @@ export default {
...
@@ -412,6 +415,7 @@ export default {
this
.
$forceUpdate
();
this
.
$forceUpdate
();
this
.
dataAll
.
TripMapList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
TripMapList
));
this
.
dataAll
.
TripMapList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
TripMapList
));
},
},
// 查询城市
SearchCity
(
MId
,
x
,
index
)
{
SearchCity
(
MId
,
x
,
index
)
{
if
(
x
)
{
if
(
x
)
{
x
.
NationList
.
forEach
(
item
=>
{
x
.
NationList
.
forEach
(
item
=>
{
...
@@ -660,7 +664,7 @@ export default {
...
@@ -660,7 +664,7 @@ export default {
.
setLngLat
(
result
)
.
setLngLat
(
result
)
.
addTo
(
this
.
map
);
.
addTo
(
this
.
map
);
const
offset
=
marker
.
getOffset
();
const
offset
=
marker
.
getOffset
();
console
.
log
(
offset
,
"----"
);
console
.
log
(
offset
,
"----
offset
"
);
}
}
})
})
);
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment