这里可能会有朋友应为网络问题打不开 github ,可以查看作者另一篇关于解决该问题的文章👉GitHub 打不开问题解决
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title> vue 本地中导入 maptalks </title>
<link href="./public/maptalks.css" rel='stylesheet' type="text/css" />
<script src="./public/maptalks.min.js" type="text/javascript"></script>
<script src="./public/maptalks.js" type="text/javascript"></script>
</head>
<body>
<div id="app"></div>
</body>
</html>
methods:{
createMap(){
let myMap = new maptalks.Map(...)
}
}