update mapbox api

This commit is contained in:
j 2022-09-03 18:27:35 +02:00
parent 41f64f4e26
commit a07caf5b06
2 changed files with 5 additions and 4 deletions

View file

@ -4,9 +4,9 @@
<title></title>
<meta charset="UTF-8"/>
<script>var config = {};</script>
<script src="https://api.mapbox.com/mapbox.js/v2.2.2/mapbox.js" type="text/javascript"></script>
<script src="https://api.mapbox.com/mapbox.js/v3.3.1/mapbox.js" type="text/javascript"></script>
<script src="/static/js/app.js?0" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="https://api.mapbox.com/mapbox.js/v2.2.2/mapbox.css" />
<link rel="stylesheet" type="text/css" href="https://api.mapbox.com/mapbox.js/v3.3.1/mapbox.css" />
<link rel="stylesheet" type="text/css" href="/static/css/app.css" />
<meta name="google" value="notranslate"/>
</head>

View file

@ -164,8 +164,9 @@ window.app = (function() {
if (!marker) {
if (!map) {
L.mapbox.accessToken = config.mapboxAccessToken;
map = L.mapbox.map('map', 'mapbox.streets')
.setView(coords, zoomLevel);
map = L.mapbox.map('map')
.setView(coords, zoomLevel)
.addLayer(L.mapbox.styleLayer('mapbox://styles/mapbox/streets-v11'));
}
marker = L.marker(coords, options)
.bindPopup(options.title)