phpvms/public/assets/admin/js/admin.js
2017-12-07 18:43:09 -06:00

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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgNGQ4ZGVjOGMzMDBjNTViZjg2YzkiLCJ3ZWJwYWNrOi8vLy4vcHVibGljL2pzL2FkbWluL2FkbWluLmpzIiwid2VicGFjazovLy8uL3B1YmxpYy9hc3NldHMvYWRtaW4vc2Fzcy9wYXBlci1kYXNoYm9hcmQuc2NzcyJdLCJuYW1lcyI6WyJwaHB2bXNfdmFjZW50cmFsX2FpcnBvcnRfbG9va3VwIiwiaWNhbyIsImNhbGxiYWNrIiwiJCIsImFqYXgiLCJ1cmwiLCJtZXRob2QiLCJkb25lIiwiZGF0YSIsInN0YXR1cyIsInBocHZtc19yZW5kZXJfYWlyc3BhY2VfbWFwIiwib3B0cyIsIl9fcGFyc2Vfb3B0cyIsIm1hcCIsIl9fZHJhd19iYXNlX21hcCIsInNldF9tYXJrZXIiLCJMIiwibWFya2VyIiwiY29vcmRzIiwiYWRkVG8iLCJfIiwiZGVmYXVsdHMiLCJyZW5kZXJfZWxlbSIsIm92ZXJsYXlfZWxlbSIsImxhdCIsImxvbiIsInpvb20iLCJsYXllcnMiLCJvcGVuY3ljbGVtYXBfcGh5c19vc20iLCJUaWxlTGF5ZXIiLCJtYXhab29tIiwibWluWm9vbSIsImZvcm1hdCIsInRyYW5zcGFyZW50Iiwib3BlbmFpcF9jYWNoZWRfYmFzZW1hcCIsInRtcyIsImRldGVjdFJldGluYSIsInN1YmRvbWFpbnMiLCJvcGVuYWlwX2Jhc2VtYXBfcGh5c19vc20iLC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