Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
夜猫逐梦
VueJS_430452
提交
d82c21a3
V
VueJS_430452
项目概览
夜猫逐梦
/
VueJS_430452
与 Fork 源项目一致
Fork自
inscode / VueJS
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
VueJS_430452
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
d82c21a3
编写于
11月 09, 2023
作者:
K
kinghzking
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Thu Nov 9 16:09:00 CST 2023 inscode
上级
a82fb128
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
12 deletion
+18
-12
test/leaflet.html
test/leaflet.html
+18
-12
未找到文件。
test/leaflet.html
浏览文件 @
d82c21a3
...
@@ -4,27 +4,33 @@
...
@@ -4,27 +4,33 @@
<meta
charset=
"UTF-8"
>
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<script
src=
"https://unpkg.com/leaflet/dist/leaflet.js"
></script>
<script
src=
"https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"
></script>
<link
rel=
"stylesheet"
href=
"https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
/>
<title>
Document
</title>
<title>
Document
</title>
<style>
html
,
body
,
#map
{
height
:
100%
;
}
</style>
</head>
</head>
<body>
<body>
<div
id=
"map"
></div>
<div
id=
"map"
></div>
<script>
<script>
var
map
=
L
.
map
(
'
map
'
).
setView
([
51.505
,
-
0.12
],
13
);
var
map
=
new
L
.
Map
(
'
map
'
,
{
L
.
tileLayer
(
'
https://api.mapbox.com/styles/v1/mapbox/streets-v10/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoiZ3Jhc2giLCJhIjoiY2ludGVncmF0aW9uaW50biJ9.307npnHiWXDn9B37olXTLnA
'
,
{
center
:
new
L
.
LatLng
(
39.86
,
116.45
),
attribution
:
'
Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>
'
,
zoom
:
4
maxZoom
:
18
,
});
minZoom
:
10
L
.
tileLayer
(
'
http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png
'
,
{
attribution
:
'
夜猫逐梦 @CartoDB Positron
'
,
maxZoom
:
18
}).
addTo
(
map
);
}).
addTo
(
map
);
var
polyline
=
L
.
polyline
([[
51.505
,
-
0.12
],
[
51.515
,
-
0.12
5
]],
{
var
polyline
=
L
.
polyline
([[
39.92
,
116.46
],
[
31.213
,
121.44
5
]],
{
color
:
'
red
'
,
color
:
'
red
'
,
weight
:
3
weight
:
3
}).
addTo
(
map
);
}).
addTo
(
map
);
var
animation
=
new
L
.
Animate
(
polyline
,
{
positions
:
[[
51.505
,
-
0.12
],
[
51.515
,
-
0.125
]],
var
bj
=
L
.
marker
([
39.92
,
116.46
]).
bindPopup
(
'
这里是北京
'
);
opacity
:
0.5
,
var
sh
=
L
.
marker
([
31.213
,
121.445
]).
bindPopup
(
'
这里是上海
'
);
ease
:
'
linear
'
var
gz
=
L
.
marker
([
23.16
,
113.23
]).
bindPopup
(
'
这里是广州
'
);
}).
run
(
);
var
cities
=
L
.
layerGroup
([
bj
,
sh
,
gz
]).
addTo
(
map
);
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录