Browse Source

Make map more 3D

master
Skylar Ittner 3 years ago
parent
commit
519284a056
  1. 2
      www/js/home.js
  2. 9
      www/js/map.js

2
www/js/home.js

@ -24,6 +24,7 @@ $(".view-main").on("card:close", ".card-expandable", function () {
$(".view-main").on("card:closed", ".card-expandable", function () {
$(".ptr-preloader").removeClass("display-none");
$(this).removeClass("card-expandable");
leafletgllayer._glMap.setPitch(0);
leafletmap.invalidateSize();
});
@ -54,6 +55,7 @@ function openReceiveCard() {
function openMapCard() {
$("#map-card").addClass("card-expandable");
app.card.open("#map-card");
leafletgllayer._glMap.setPitch(40);
leafletmap.invalidateSize();
}

9
www/js/map.js

@ -10,7 +10,10 @@ var leafletmap = L.map('map', {
minZoom: 12
});
leafletmap.setView([46.595, -112.019], 13);
var gl = L.mapboxGL({
var leafletgllayer = L.mapboxGL({
accessToken: 'none',
style: 'https://maptiles.netsyms.net/styles/klokantech-basic/style.json'
}).addTo(leafletmap);
style: 'https://maps.netsyms.net/styles/klokantech-3d-gl/style.json',
pitch: 0
});
leafletgllayer.addTo(leafletmap);
Loading…
Cancel
Save