176 lines
16 KiB
JavaScript
176 lines
16 KiB
JavaScript
|
/******/ (function(modules) { // webpackBootstrap
|
||
|
/******/ // The module cache
|
||
|
/******/ var installedModules = {};
|
||
|
/******/
|
||
|
/******/ // The require function
|
||
|
/******/ function __webpack_require__(moduleId) {
|
||
|
/******/
|
||
|
/******/ // Check if module is in cache
|
||
|
/******/ if(installedModules[moduleId]) {
|
||
|
/******/ return installedModules[moduleId].exports;
|
||
|
/******/ }
|
||
|
/******/ // Create a new module (and put it into the cache)
|
||
|
/******/ var module = installedModules[moduleId] = {
|
||
|
/******/ i: moduleId,
|
||
|
/******/ l: false,
|
||
|
/******/ exports: {}
|
||
|
/******/ };
|
||
|
/******/
|
||
|
/******/ // Execute the module function
|
||
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||
|
/******/
|
||
|
/******/ // Flag the module as loaded
|
||
|
/******/ module.l = true;
|
||
|
/******/
|
||
|
/******/ // Return the exports of the module
|
||
|
/******/ return module.exports;
|
||
|
/******/ }
|
||
|
/******/
|
||
|
/******/
|
||
|
/******/ // expose the modules object (__webpack_modules__)
|
||
|
/******/ __webpack_require__.m = modules;
|
||
|
/******/
|
||
|
/******/ // expose the module cache
|
||
|
/******/ __webpack_require__.c = installedModules;
|
||
|
/******/
|
||
|
/******/ // define getter function for harmony exports
|
||
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
||
|
/******/ Object.defineProperty(exports, name, {
|
||
|
/******/ configurable: false,
|
||
|
/******/ enumerable: true,
|
||
|
/******/ get: getter
|
||
|
/******/ });
|
||
|
/******/ }
|
||
|
/******/ };
|
||
|
/******/
|
||
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||
|
/******/ __webpack_require__.n = function(module) {
|
||
|
/******/ var getter = module && module.__esModule ?
|
||
|
/******/ function getDefault() { return module['default']; } :
|
||
|
/******/ function getModuleExports() { return module; };
|
||
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
||
|
/******/ return getter;
|
||
|
/******/ };
|
||
|
/******/
|
||
|
/******/ // Object.prototype.hasOwnProperty.call
|
||
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||
|
/******/
|
||
|
/******/ // __webpack_public_path__
|
||
|
/******/ __webpack_require__.p = "";
|
||
|
/******/
|
||
|
/******/ // Load entry module and return exports
|
||
|
/******/ return __webpack_require__(__webpack_require__.s = 0);
|
||
|
/******/ })
|
||
|
/************************************************************************/
|
||
|
/******/ ([
|
||
|
/* 0 */
|
||
|
/***/ (function(module, exports, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__(1);
|
||
|
module.exports = __webpack_require__(2);
|
||
|
|
||
|
|
||
|
/***/ }),
|
||
|
/* 1 */
|
||
|
/***/ (function(module, exports) {
|
||
|
|
||
|
/**
|
||
|
* admin functions, mostly map/mapping related
|
||
|
*/
|
||
|
|
||
|
function phpvms_vacentral_airport_lookup(icao, callback) {
|
||
|
$.ajax({
|
||
|
url: '/api/airports/' + icao + '/lookup',
|
||
|
method: 'GET'
|
||
|
}).done(function (data, status) {
|
||
|
callback(data.data);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
function phpvms_render_airspace_map(opts) {
|
||
|
opts = __parse_opts(opts);
|
||
|
var map = __draw_base_map(opts);
|
||
|
if (opts.set_marker == true) {
|
||
|
L.marker(coords).addTo(map);
|
||
|
}
|
||
|
return map;
|
||
|
}
|
||
|
|
||
|
function __parse_opts(opts) {
|
||
|
_.defaults(opts, {
|
||
|
render_elem: 'map',
|
||
|
overlay_elem: '',
|
||
|
lat: 0,
|
||
|
lon: 0,
|
||
|
zoom: 12,
|
||
|
layers: [],
|
||
|
set_marker: false
|
||
|
});
|
||
|
|
||
|
return opts;
|
||
|
}
|
||
|
|
||
|
function __draw_base_map(opts) {
|
||
|
|
||
|
var coords = [opts.lat, opts.lon];
|
||
|
|
||
|
/*var openaip_airspace_labels = new L.TileLayer.WMS(
|
||
|
"http://{s}.tile.maps.openaip.net/geowebcache/service/wms", {
|
||
|
maxZoom: 14,
|
||
|
minZoom: 12,
|
||
|
layers: 'openaip_approved_airspaces_labels',
|
||
|
tileSize: 1024,
|
||
|
detectRetina: true,
|
||
|
subdomains: '12',
|
||
|
format: 'image/png',
|
||
|
transparent: true
|
||
|
});
|
||
|
openaip_airspace_labels.addTo(map);*/
|
||
|
|
||
|
var opencyclemap_phys_osm = new L.TileLayer('http://{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png?apikey=f09a38fa87514de4890fc96e7fe8ecb1', {
|
||
|
maxZoom: 14,
|
||
|
minZoom: 4,
|
||
|
format: 'image/png',
|
||
|
transparent: true
|
||
|
});
|
||
|
|
||
|
var openaip_cached_basemap = new L.TileLayer("http://{s}.tile.maps.openaip.net/geowebcache/service/tms/1.0.0/openaip_basemap@EPSG%3A900913@png/{z}/{x}/{y}.png", {
|
||
|
maxZoom: 14,
|
||
|
minZoom: 4,
|
||
|
tms: true,
|
||
|
detectRetina: false,
|
||
|
subdomains: '12',
|
||
|
format: 'image/png',
|
||
|
transparent: true
|
||
|
});
|
||
|
|
||
|
var openaip_basemap_phys_osm = L.featureGroup([opencyclemap_phys_osm, openaip_cached_basemap]);
|
||
|
|
||
|
var map = L.map('map', {
|
||
|
layers: [openaip_basemap_phys_osm],
|
||
|
center: coords,
|
||
|
zoom: opts.zoom,
|
||
|
scrollWheelZoom: false
|
||
|
}).setView(coords, opts.zoom);
|
||
|
|
||
|
var attrib = L.control.attribution({ position: 'bottomleft' });
|
||
|
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;
|
||
|
}
|
||
|
|
||
|
/***/ }),
|
||
|
/* 2 */
|
||
|
/***/ (function(module, exports) {
|
||
|
|
||
|
// removed by extract-text-webpack-plugin
|
||
|
|
||
|
/***/ })
|
||
|
/******/ ]);
|
||
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgNGQ4ZGVjOGMzMDBjNTViZjg2YzkiLCJ3ZWJwYWNrOi8vLy4vcHVibGljL2pzL2FkbWluL2FkbWluLmpzIiwid2VicGFjazovLy8uL3B1YmxpYy9hc3NldHMvYWRtaW4vc2Fzcy9wYXBlci1kYXNoYm9hcmQuc2NzcyJdLCJuYW1lcyI6WyJwaHB2bXNfdmFjZW50cmFsX2FpcnBvcnRfbG9va3VwIiwiaWNhbyIsImNhbGxiYWNrIiwiJCIsImFqYXgiLCJ1cmwiLCJtZXRob2QiLCJkb25lIiwiZGF0YSIsInN0YXR1cyIsInBocHZtc19yZW5kZXJfYWlyc3BhY2VfbWFwIiwib3B0cyIsIl9fcGFyc2Vfb3B0cyIsIm1hcCIsIl9fZHJhd19iYXNlX21hcCIsInNldF9tYXJrZXIiLCJMIiwibWFya2VyIiwiY29vcmRzIiwiYWRkVG8iLCJfIiwiZGVmYXVsdHMiLCJyZW5kZXJfZWxlbSIsIm92ZXJsYXlfZWxlbSIsImxhdCIsImxvbiIsInpvb20iLCJsYXllcnMiLCJvcGVuY3ljbGVtYXBfcGh5c19vc20iLCJUaWxlTGF5ZXIiLCJtYXhab29tIiwibWluWm9vbSIsImZvcm1hdCIsInRyYW5zcGFyZW50Iiwib3BlbmFpcF9jYWNoZWRfYmFzZW1hcCIsInRtcyIsImRldGVjdFJldGluYSIsInN1YmRvbWFpbnMiLCJvcGVuYWlwX2Jhc2VtYXBfcGh5c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