use openstreetmap
This commit is contained in:
parent
a07caf5b06
commit
60aadcb76d
3 changed files with 9 additions and 6 deletions
|
@ -8,6 +8,7 @@
|
|||
#users {
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
z-index: 1000;
|
||||
}
|
||||
.person {
|
||||
border: 2px solid rgb(255, 255, 255);
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
<title></title>
|
||||
<meta charset="UTF-8"/>
|
||||
<script>var config = {};</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/v3.3.1/mapbox.css" />
|
||||
<script src="/static/js/leaflet.js"></script>
|
||||
<script src="/static/js/app.js?0"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/leaflet.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/app.css" />
|
||||
<meta name="google" value="notranslate"/>
|
||||
</head>
|
||||
|
|
|
@ -163,10 +163,12 @@ window.app = (function() {
|
|||
};
|
||||
if (!marker) {
|
||||
if (!map) {
|
||||
L.mapbox.accessToken = config.mapboxAccessToken;
|
||||
map = L.mapbox.map('map')
|
||||
map = L.map('map')
|
||||
.setView(coords, zoomLevel)
|
||||
.addLayer(L.mapbox.styleLayer('mapbox://styles/mapbox/streets-v11'));
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19,
|
||||
attribution: '© OpenStreetMap'
|
||||
}).addTo(map)
|
||||
}
|
||||
marker = L.marker(coords, options)
|
||||
.bindPopup(options.title)
|
||||
|
|
Loading…
Reference in a new issue