Skip to content

Commit

Permalink
added map base layers
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgend committed Sep 8, 2021
1 parent 0f11953 commit 62a17fd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/public/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ const _mapBaseLayers = {
maxZoom: 19,
attribution: '&copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
}),
CartoLight: L.tileLayer('https://cartodb-basemaps-a.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
}),
CartoBlack: L.tileLayer('https://cartodb-basemaps-a.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
}),

};
const _airportIcon = L.icon({
Expand Down Expand Up @@ -56,7 +64,7 @@ const init = () => {
_map = L.map('map').setView(_homeLocation, 10);

// control & marker layers
_mapBaseLayers.OSMBW.addTo(_map);
_mapBaseLayers.CartoBlack.addTo(_map);
_aircraftMarkerLayer = L.layerGroup().addTo(_map);
_airportMarkerLayer = L.layerGroup().addTo(_map);
_heliportMarkerLayer = L.layerGroup().addTo(_map);
Expand Down

0 comments on commit 62a17fd

Please sign in to comment.