Add leaflet-providers
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
"laravel-mix": "~2.1",
|
"laravel-mix": "~2.1",
|
||||||
"leaflet": "~1.3",
|
"leaflet": "~1.3",
|
||||||
"leaflet-ajax": "2.1.0",
|
"leaflet-ajax": "2.1.0",
|
||||||
|
"leaflet-providers": "^1.1.17",
|
||||||
"leaflet-rotatedmarker": "^0.2.0",
|
"leaflet-rotatedmarker": "^0.2.0",
|
||||||
"lodash": "4.17.4",
|
"lodash": "4.17.4",
|
||||||
"marked": "0.3.9",
|
"marked": "0.3.9",
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"/assets/frontend/js/app.js": "/assets/frontend/js/app.js?id=03915ea0eedba5cf1b1e",
|
"/assets/frontend/js/app.js": "/assets/frontend/js/app.js?id=6444c18feb0a63300330",
|
||||||
"/assets/frontend/css/now-ui-kit.css": "/assets/frontend/css/now-ui-kit.css?id=b0a0f05b94a4486db4f2",
|
"/assets/frontend/css/now-ui-kit.css": "/assets/frontend/css/now-ui-kit.css?id=b0a0f05b94a4486db4f2",
|
||||||
"/assets/admin/css/vendor.min.css": "/assets/admin/css/vendor.min.css?id=cc80aec3cf1646f83d8d",
|
"/assets/admin/css/vendor.min.css": "/assets/admin/css/vendor.min.css?id=cc80aec3cf1646f83d8d",
|
||||||
"/assets/admin/js/app.js": "/assets/admin/js/app.js?id=56dfb08df451052afdd3",
|
"/assets/admin/js/app.js": "/assets/admin/js/app.js?id=3f868969d6489b407712",
|
||||||
"/assets/installer/js/app.js": "/assets/installer/js/app.js?id=3a51850509367b06cd1f",
|
"/assets/installer/js/app.js": "/assets/installer/js/app.js?id=3a51850509367b06cd1f",
|
||||||
"/assets/fonts/glyphicons-halflings-regular.woff2": "/assets/fonts/glyphicons-halflings-regular.woff2?id=349344e92fb16221dd56",
|
"/assets/fonts/glyphicons-halflings-regular.woff2": "/assets/fonts/glyphicons-halflings-regular.woff2?id=349344e92fb16221dd56",
|
||||||
"/assets/admin/fonts/glyphicons-halflings-regular.woff2": "/assets/admin/fonts/glyphicons-halflings-regular.woff2?id=349344e92fb16221dd56",
|
"/assets/admin/fonts/glyphicons-halflings-regular.woff2": "/assets/admin/fonts/glyphicons-halflings-regular.woff2?id=349344e92fb16221dd56",
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
//
|
||||||
|
|
||||||
const leaflet = require('leaflet');
|
const leaflet = require('leaflet');
|
||||||
|
require('leaflet-providers');
|
||||||
|
|
||||||
export default (opts) => {
|
export default (opts) => {
|
||||||
|
|
||||||
@@ -11,8 +14,9 @@ export default (opts) => {
|
|||||||
set_marker: false,
|
set_marker: false,
|
||||||
}, opts);
|
}, opts);
|
||||||
|
|
||||||
|
/*
|
||||||
let feature_groups = [];
|
let feature_groups = [];
|
||||||
/*var openaip_airspace_labels = new leaflet.TileLayer.WMS(
|
const openaip_airspace_labels = new leaflet.TileLayer.WMS(
|
||||||
"http://{s}.tile.maps.openaip.net/geowebcache/service/wms", {
|
"http://{s}.tile.maps.openaip.net/geowebcache/service/wms", {
|
||||||
maxZoom: 14,
|
maxZoom: 14,
|
||||||
minZoom: 12,
|
minZoom: 12,
|
||||||
@@ -26,16 +30,6 @@ export default (opts) => {
|
|||||||
|
|
||||||
openaip_airspace_labels.addTo(map);*/
|
openaip_airspace_labels.addTo(map);*/
|
||||||
|
|
||||||
const opencyclemap_phys_osm = new leaflet.TileLayer(
|
|
||||||
'http://{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png?apikey=f09a38fa87514de4890fc96e7fe8ecb1', {
|
|
||||||
maxZoom: 14,
|
|
||||||
minZoom: 4,
|
|
||||||
format: 'image/png',
|
|
||||||
transparent: true
|
|
||||||
})
|
|
||||||
|
|
||||||
feature_groups.push(opencyclemap_phys_osm)
|
|
||||||
|
|
||||||
/*const openaip_cached_basemap = new leaflet.TileLayer("http://{s}.tile.maps.openaip.net/geowebcache/service/tms/1.0.0/openaip_basemap@EPSG%3A900913@png/{z}/{x}/{y}.png", {
|
/*const openaip_cached_basemap = new leaflet.TileLayer("http://{s}.tile.maps.openaip.net/geowebcache/service/tms/1.0.0/openaip_basemap@EPSG%3A900913@png/{z}/{x}/{y}.png", {
|
||||||
maxZoom: 14,
|
maxZoom: 14,
|
||||||
minZoom: 4,
|
minZoom: 4,
|
||||||
@@ -49,22 +43,14 @@ export default (opts) => {
|
|||||||
feature_groups.push(openaip_cached_basemap);
|
feature_groups.push(openaip_cached_basemap);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const openaip_basemap_phys_osm = leaflet.featureGroup(feature_groups);
|
|
||||||
|
|
||||||
let map = leaflet.map('map', {
|
let map = leaflet.map('map', {
|
||||||
layers: [openaip_basemap_phys_osm],
|
//layers: [openaip_basemap_phys_osm],
|
||||||
center: opts.center,
|
center: opts.center,
|
||||||
zoom: opts.zoom,
|
zoom: opts.zoom,
|
||||||
scrollWheelZoom: false,
|
scrollWheelZoom: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const attrib = leaflet.control.attribution({position: 'bottomleft'})
|
leaflet.tileLayer.provider('Esri.WorldStreetMap').addTo(map);
|
||||||
attrib.addAttribution('<a href="https://www.thunderforest.com" target="_blank" style="">Thunderforest</a>')
|
|
||||||
attrib.addAttribution('<a href="https://www.openaip.net" target="_blank" style="">openAIP</a>')
|
|
||||||
attrib.addAttribution('<a href="https://www.openstreetmap.org/copyright" target="_blank" style="">OpenStreetMap</a> contributors')
|
|
||||||
attrib.addAttribution('<a href="https://www.openweathermap.org" target="_blank" style="">OpenWeatherMap</a>')
|
|
||||||
|
|
||||||
attrib.addTo(map);
|
return map;
|
||||||
|
|
||||||
return map
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4346,6 +4346,10 @@ leaflet-ajax@2.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
lie "^3.0.1"
|
lie "^3.0.1"
|
||||||
|
|
||||||
|
leaflet-providers@^1.1.17:
|
||||||
|
version "1.1.17"
|
||||||
|
resolved "https://registry.yarnpkg.com/leaflet-providers/-/leaflet-providers-1.1.17.tgz#674628895dacae7f185ec0896039e95bbbadee46"
|
||||||
|
|
||||||
leaflet-rotatedmarker@^0.2.0:
|
leaflet-rotatedmarker@^0.2.0:
|
||||||
version "0.2.0"
|
version "0.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/leaflet-rotatedmarker/-/leaflet-rotatedmarker-0.2.0.tgz#4467f49f98d1bfd56959bd9c6705203dd2601277"
|
resolved "https://registry.yarnpkg.com/leaflet-rotatedmarker/-/leaflet-rotatedmarker-0.2.0.tgz#4467f49f98d1bfd56959bd9c6705203dd2601277"
|
||||||
|
|||||||
Reference in New Issue
Block a user