intro publish
This commit is contained in:
parent
8287a15d2c
commit
146dcf056e
36 changed files with 5878 additions and 17 deletions
18
_freeze/blog/canada_camper/execute-results/html.json
Normal file
18
_freeze/blog/canada_camper/execute-results/html.json
Normal file
File diff suppressed because one or more lines are too long
272
_freeze/site_libs/Proj4Leaflet-1.0.1/proj4leaflet.js
Normal file
272
_freeze/site_libs/Proj4Leaflet-1.0.1/proj4leaflet.js
Normal file
|
@ -0,0 +1,272 @@
|
||||||
|
(function (factory) {
|
||||||
|
var L, proj4;
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
// AMD
|
||||||
|
define(['leaflet', 'proj4'], factory);
|
||||||
|
} else if (typeof module === 'object' && typeof module.exports === "object") {
|
||||||
|
// Node/CommonJS
|
||||||
|
L = require('leaflet');
|
||||||
|
proj4 = require('proj4');
|
||||||
|
module.exports = factory(L, proj4);
|
||||||
|
} else {
|
||||||
|
// Browser globals
|
||||||
|
if (typeof window.L === 'undefined' || typeof window.proj4 === 'undefined')
|
||||||
|
throw 'Leaflet and proj4 must be loaded first';
|
||||||
|
factory(window.L, window.proj4);
|
||||||
|
}
|
||||||
|
}(function (L, proj4) {
|
||||||
|
if (proj4.__esModule && proj4.default) {
|
||||||
|
// If proj4 was bundled as an ES6 module, unwrap it to get
|
||||||
|
// to the actual main proj4 object.
|
||||||
|
// See discussion in https://github.com/kartena/Proj4Leaflet/pull/147
|
||||||
|
proj4 = proj4.default;
|
||||||
|
}
|
||||||
|
|
||||||
|
L.Proj = {};
|
||||||
|
|
||||||
|
L.Proj._isProj4Obj = function(a) {
|
||||||
|
return (typeof a.inverse !== 'undefined' &&
|
||||||
|
typeof a.forward !== 'undefined');
|
||||||
|
};
|
||||||
|
|
||||||
|
L.Proj.Projection = L.Class.extend({
|
||||||
|
initialize: function(code, def, bounds) {
|
||||||
|
var isP4 = L.Proj._isProj4Obj(code);
|
||||||
|
this._proj = isP4 ? code : this._projFromCodeDef(code, def);
|
||||||
|
this.bounds = isP4 ? def : bounds;
|
||||||
|
},
|
||||||
|
|
||||||
|
project: function (latlng) {
|
||||||
|
var point = this._proj.forward([latlng.lng, latlng.lat]);
|
||||||
|
return new L.Point(point[0], point[1]);
|
||||||
|
},
|
||||||
|
|
||||||
|
unproject: function (point, unbounded) {
|
||||||
|
var point2 = this._proj.inverse([point.x, point.y]);
|
||||||
|
return new L.LatLng(point2[1], point2[0], unbounded);
|
||||||
|
},
|
||||||
|
|
||||||
|
_projFromCodeDef: function(code, def) {
|
||||||
|
if (def) {
|
||||||
|
proj4.defs(code, def);
|
||||||
|
} else if (proj4.defs[code] === undefined) {
|
||||||
|
var urn = code.split(':');
|
||||||
|
if (urn.length > 3) {
|
||||||
|
code = urn[urn.length - 3] + ':' + urn[urn.length - 1];
|
||||||
|
}
|
||||||
|
if (proj4.defs[code] === undefined) {
|
||||||
|
throw 'No projection definition for code ' + code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return proj4(code);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
L.Proj.CRS = L.Class.extend({
|
||||||
|
includes: L.CRS,
|
||||||
|
|
||||||
|
options: {
|
||||||
|
transformation: new L.Transformation(1, 0, -1, 0)
|
||||||
|
},
|
||||||
|
|
||||||
|
initialize: function(a, b, c) {
|
||||||
|
var code,
|
||||||
|
proj,
|
||||||
|
def,
|
||||||
|
options;
|
||||||
|
|
||||||
|
if (L.Proj._isProj4Obj(a)) {
|
||||||
|
proj = a;
|
||||||
|
code = proj.srsCode;
|
||||||
|
options = b || {};
|
||||||
|
|
||||||
|
this.projection = new L.Proj.Projection(proj, options.bounds);
|
||||||
|
} else {
|
||||||
|
code = a;
|
||||||
|
def = b;
|
||||||
|
options = c || {};
|
||||||
|
this.projection = new L.Proj.Projection(code, def, options.bounds);
|
||||||
|
}
|
||||||
|
|
||||||
|
L.Util.setOptions(this, options);
|
||||||
|
this.code = code;
|
||||||
|
this.transformation = this.options.transformation;
|
||||||
|
|
||||||
|
if (this.options.origin) {
|
||||||
|
this.transformation =
|
||||||
|
new L.Transformation(1, -this.options.origin[0],
|
||||||
|
-1, this.options.origin[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.options.scales) {
|
||||||
|
this._scales = this.options.scales;
|
||||||
|
} else if (this.options.resolutions) {
|
||||||
|
this._scales = [];
|
||||||
|
for (var i = this.options.resolutions.length - 1; i >= 0; i--) {
|
||||||
|
if (this.options.resolutions[i]) {
|
||||||
|
this._scales[i] = 1 / this.options.resolutions[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.infinite = !this.options.bounds;
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
scale: function(zoom) {
|
||||||
|
var iZoom = Math.floor(zoom),
|
||||||
|
baseScale,
|
||||||
|
nextScale,
|
||||||
|
scaleDiff,
|
||||||
|
zDiff;
|
||||||
|
if (zoom === iZoom) {
|
||||||
|
return this._scales[zoom];
|
||||||
|
} else {
|
||||||
|
// Non-integer zoom, interpolate
|
||||||
|
baseScale = this._scales[iZoom];
|
||||||
|
nextScale = this._scales[iZoom + 1];
|
||||||
|
scaleDiff = nextScale - baseScale;
|
||||||
|
zDiff = (zoom - iZoom);
|
||||||
|
return baseScale + scaleDiff * zDiff;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
zoom: function(scale) {
|
||||||
|
// Find closest number in this._scales, down
|
||||||
|
var downScale = this._closestElement(this._scales, scale),
|
||||||
|
downZoom = this._scales.indexOf(downScale),
|
||||||
|
nextScale,
|
||||||
|
nextZoom,
|
||||||
|
scaleDiff;
|
||||||
|
// Check if scale is downScale => return array index
|
||||||
|
if (scale === downScale) {
|
||||||
|
return downZoom;
|
||||||
|
}
|
||||||
|
if (downScale === undefined) {
|
||||||
|
return -Infinity;
|
||||||
|
}
|
||||||
|
// Interpolate
|
||||||
|
nextZoom = downZoom + 1;
|
||||||
|
nextScale = this._scales[nextZoom];
|
||||||
|
if (nextScale === undefined) {
|
||||||
|
return Infinity;
|
||||||
|
}
|
||||||
|
scaleDiff = nextScale - downScale;
|
||||||
|
return (scale - downScale) / scaleDiff + downZoom;
|
||||||
|
},
|
||||||
|
|
||||||
|
distance: L.CRS.Earth.distance,
|
||||||
|
|
||||||
|
R: L.CRS.Earth.R,
|
||||||
|
|
||||||
|
/* Get the closest lowest element in an array */
|
||||||
|
_closestElement: function(array, element) {
|
||||||
|
var low;
|
||||||
|
for (var i = array.length; i--;) {
|
||||||
|
if (array[i] <= element && (low === undefined || low < array[i])) {
|
||||||
|
low = array[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return low;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
L.Proj.GeoJSON = L.GeoJSON.extend({
|
||||||
|
initialize: function(geojson, options) {
|
||||||
|
this._callLevel = 0;
|
||||||
|
L.GeoJSON.prototype.initialize.call(this, geojson, options);
|
||||||
|
},
|
||||||
|
|
||||||
|
addData: function(geojson) {
|
||||||
|
var crs;
|
||||||
|
|
||||||
|
if (geojson) {
|
||||||
|
if (geojson.crs && geojson.crs.type === 'name') {
|
||||||
|
crs = new L.Proj.CRS(geojson.crs.properties.name);
|
||||||
|
} else if (geojson.crs && geojson.crs.type) {
|
||||||
|
crs = new L.Proj.CRS(geojson.crs.type + ':' + geojson.crs.properties.code);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (crs !== undefined) {
|
||||||
|
this.options.coordsToLatLng = function(coords) {
|
||||||
|
var point = L.point(coords[0], coords[1]);
|
||||||
|
return crs.projection.unproject(point);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Base class' addData might call us recursively, but
|
||||||
|
// CRS shouldn't be cleared in that case, since CRS applies
|
||||||
|
// to the whole GeoJSON, inluding sub-features.
|
||||||
|
this._callLevel++;
|
||||||
|
try {
|
||||||
|
L.GeoJSON.prototype.addData.call(this, geojson);
|
||||||
|
} finally {
|
||||||
|
this._callLevel--;
|
||||||
|
if (this._callLevel === 0) {
|
||||||
|
delete this.options.coordsToLatLng;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
L.Proj.geoJson = function(geojson, options) {
|
||||||
|
return new L.Proj.GeoJSON(geojson, options);
|
||||||
|
};
|
||||||
|
|
||||||
|
L.Proj.ImageOverlay = L.ImageOverlay.extend({
|
||||||
|
initialize: function (url, bounds, options) {
|
||||||
|
L.ImageOverlay.prototype.initialize.call(this, url, null, options);
|
||||||
|
this._projectedBounds = bounds;
|
||||||
|
},
|
||||||
|
|
||||||
|
// Danger ahead: Overriding internal methods in Leaflet.
|
||||||
|
// Decided to do this rather than making a copy of L.ImageOverlay
|
||||||
|
// and doing very tiny modifications to it.
|
||||||
|
// Future will tell if this was wise or not.
|
||||||
|
_animateZoom: function (event) {
|
||||||
|
var scale = this._map.getZoomScale(event.zoom);
|
||||||
|
var northWest = L.point(this._projectedBounds.min.x, this._projectedBounds.max.y);
|
||||||
|
var offset = this._projectedToNewLayerPoint(northWest, event.zoom, event.center);
|
||||||
|
|
||||||
|
L.DomUtil.setTransform(this._image, offset, scale);
|
||||||
|
},
|
||||||
|
|
||||||
|
_reset: function () {
|
||||||
|
var zoom = this._map.getZoom();
|
||||||
|
var pixelOrigin = this._map.getPixelOrigin();
|
||||||
|
var bounds = L.bounds(
|
||||||
|
this._transform(this._projectedBounds.min, zoom)._subtract(pixelOrigin),
|
||||||
|
this._transform(this._projectedBounds.max, zoom)._subtract(pixelOrigin)
|
||||||
|
);
|
||||||
|
var size = bounds.getSize();
|
||||||
|
|
||||||
|
L.DomUtil.setPosition(this._image, bounds.min);
|
||||||
|
this._image.style.width = size.x + 'px';
|
||||||
|
this._image.style.height = size.y + 'px';
|
||||||
|
},
|
||||||
|
|
||||||
|
_projectedToNewLayerPoint: function (point, zoom, center) {
|
||||||
|
var viewHalf = this._map.getSize()._divideBy(2);
|
||||||
|
var newTopLeft = this._map.project(center, zoom)._subtract(viewHalf)._round();
|
||||||
|
var topLeft = newTopLeft.add(this._map._getMapPanePos());
|
||||||
|
|
||||||
|
return this._transform(point, zoom)._subtract(topLeft);
|
||||||
|
},
|
||||||
|
|
||||||
|
_transform: function (point, zoom) {
|
||||||
|
var crs = this._map.options.crs;
|
||||||
|
var transformation = crs.transformation;
|
||||||
|
var scale = crs.scale(zoom);
|
||||||
|
|
||||||
|
return transformation.transform(point, scale);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
L.Proj.imageOverlay = function (url, bounds, options) {
|
||||||
|
return new L.Proj.ImageOverlay(url, bounds, options);
|
||||||
|
};
|
||||||
|
|
||||||
|
return L.Proj;
|
||||||
|
}));
|
7
_freeze/site_libs/clipboard/clipboard.min.js
vendored
Normal file
7
_freeze/site_libs/clipboard/clipboard.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
901
_freeze/site_libs/htmlwidgets-1.6.2/htmlwidgets.js
Normal file
901
_freeze/site_libs/htmlwidgets-1.6.2/htmlwidgets.js
Normal file
|
@ -0,0 +1,901 @@
|
||||||
|
(function() {
|
||||||
|
// If window.HTMLWidgets is already defined, then use it; otherwise create a
|
||||||
|
// new object. This allows preceding code to set options that affect the
|
||||||
|
// initialization process (though none currently exist).
|
||||||
|
window.HTMLWidgets = window.HTMLWidgets || {};
|
||||||
|
|
||||||
|
// See if we're running in a viewer pane. If not, we're in a web browser.
|
||||||
|
var viewerMode = window.HTMLWidgets.viewerMode =
|
||||||
|
/\bviewer_pane=1\b/.test(window.location);
|
||||||
|
|
||||||
|
// See if we're running in Shiny mode. If not, it's a static document.
|
||||||
|
// Note that static widgets can appear in both Shiny and static modes, but
|
||||||
|
// obviously, Shiny widgets can only appear in Shiny apps/documents.
|
||||||
|
var shinyMode = window.HTMLWidgets.shinyMode =
|
||||||
|
typeof(window.Shiny) !== "undefined" && !!window.Shiny.outputBindings;
|
||||||
|
|
||||||
|
// We can't count on jQuery being available, so we implement our own
|
||||||
|
// version if necessary.
|
||||||
|
function querySelectorAll(scope, selector) {
|
||||||
|
if (typeof(jQuery) !== "undefined" && scope instanceof jQuery) {
|
||||||
|
return scope.find(selector);
|
||||||
|
}
|
||||||
|
if (scope.querySelectorAll) {
|
||||||
|
return scope.querySelectorAll(selector);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function asArray(value) {
|
||||||
|
if (value === null)
|
||||||
|
return [];
|
||||||
|
if ($.isArray(value))
|
||||||
|
return value;
|
||||||
|
return [value];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Implement jQuery's extend
|
||||||
|
function extend(target /*, ... */) {
|
||||||
|
if (arguments.length == 1) {
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
for (var i = 1; i < arguments.length; i++) {
|
||||||
|
var source = arguments[i];
|
||||||
|
for (var prop in source) {
|
||||||
|
if (source.hasOwnProperty(prop)) {
|
||||||
|
target[prop] = source[prop];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
// IE8 doesn't support Array.forEach.
|
||||||
|
function forEach(values, callback, thisArg) {
|
||||||
|
if (values.forEach) {
|
||||||
|
values.forEach(callback, thisArg);
|
||||||
|
} else {
|
||||||
|
for (var i = 0; i < values.length; i++) {
|
||||||
|
callback.call(thisArg, values[i], i, values);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Replaces the specified method with the return value of funcSource.
|
||||||
|
//
|
||||||
|
// Note that funcSource should not BE the new method, it should be a function
|
||||||
|
// that RETURNS the new method. funcSource receives a single argument that is
|
||||||
|
// the overridden method, it can be called from the new method. The overridden
|
||||||
|
// method can be called like a regular function, it has the target permanently
|
||||||
|
// bound to it so "this" will work correctly.
|
||||||
|
function overrideMethod(target, methodName, funcSource) {
|
||||||
|
var superFunc = target[methodName] || function() {};
|
||||||
|
var superFuncBound = function() {
|
||||||
|
return superFunc.apply(target, arguments);
|
||||||
|
};
|
||||||
|
target[methodName] = funcSource(superFuncBound);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add a method to delegator that, when invoked, calls
|
||||||
|
// delegatee.methodName. If there is no such method on
|
||||||
|
// the delegatee, but there was one on delegator before
|
||||||
|
// delegateMethod was called, then the original version
|
||||||
|
// is invoked instead.
|
||||||
|
// For example:
|
||||||
|
//
|
||||||
|
// var a = {
|
||||||
|
// method1: function() { console.log('a1'); }
|
||||||
|
// method2: function() { console.log('a2'); }
|
||||||
|
// };
|
||||||
|
// var b = {
|
||||||
|
// method1: function() { console.log('b1'); }
|
||||||
|
// };
|
||||||
|
// delegateMethod(a, b, "method1");
|
||||||
|
// delegateMethod(a, b, "method2");
|
||||||
|
// a.method1();
|
||||||
|
// a.method2();
|
||||||
|
//
|
||||||
|
// The output would be "b1", "a2".
|
||||||
|
function delegateMethod(delegator, delegatee, methodName) {
|
||||||
|
var inherited = delegator[methodName];
|
||||||
|
delegator[methodName] = function() {
|
||||||
|
var target = delegatee;
|
||||||
|
var method = delegatee[methodName];
|
||||||
|
|
||||||
|
// The method doesn't exist on the delegatee. Instead,
|
||||||
|
// call the method on the delegator, if it exists.
|
||||||
|
if (!method) {
|
||||||
|
target = delegator;
|
||||||
|
method = inherited;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (method) {
|
||||||
|
return method.apply(target, arguments);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Implement a vague facsimilie of jQuery's data method
|
||||||
|
function elementData(el, name, value) {
|
||||||
|
if (arguments.length == 2) {
|
||||||
|
return el["htmlwidget_data_" + name];
|
||||||
|
} else if (arguments.length == 3) {
|
||||||
|
el["htmlwidget_data_" + name] = value;
|
||||||
|
return el;
|
||||||
|
} else {
|
||||||
|
throw new Error("Wrong number of arguments for elementData: " +
|
||||||
|
arguments.length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
|
||||||
|
function escapeRegExp(str) {
|
||||||
|
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
||||||
|
}
|
||||||
|
|
||||||
|
function hasClass(el, className) {
|
||||||
|
var re = new RegExp("\\b" + escapeRegExp(className) + "\\b");
|
||||||
|
return re.test(el.className);
|
||||||
|
}
|
||||||
|
|
||||||
|
// elements - array (or array-like object) of HTML elements
|
||||||
|
// className - class name to test for
|
||||||
|
// include - if true, only return elements with given className;
|
||||||
|
// if false, only return elements *without* given className
|
||||||
|
function filterByClass(elements, className, include) {
|
||||||
|
var results = [];
|
||||||
|
for (var i = 0; i < elements.length; i++) {
|
||||||
|
if (hasClass(elements[i], className) == include)
|
||||||
|
results.push(elements[i]);
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
function on(obj, eventName, func) {
|
||||||
|
if (obj.addEventListener) {
|
||||||
|
obj.addEventListener(eventName, func, false);
|
||||||
|
} else if (obj.attachEvent) {
|
||||||
|
obj.attachEvent(eventName, func);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function off(obj, eventName, func) {
|
||||||
|
if (obj.removeEventListener)
|
||||||
|
obj.removeEventListener(eventName, func, false);
|
||||||
|
else if (obj.detachEvent) {
|
||||||
|
obj.detachEvent(eventName, func);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Translate array of values to top/right/bottom/left, as usual with
|
||||||
|
// the "padding" CSS property
|
||||||
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/padding
|
||||||
|
function unpackPadding(value) {
|
||||||
|
if (typeof(value) === "number")
|
||||||
|
value = [value];
|
||||||
|
if (value.length === 1) {
|
||||||
|
return {top: value[0], right: value[0], bottom: value[0], left: value[0]};
|
||||||
|
}
|
||||||
|
if (value.length === 2) {
|
||||||
|
return {top: value[0], right: value[1], bottom: value[0], left: value[1]};
|
||||||
|
}
|
||||||
|
if (value.length === 3) {
|
||||||
|
return {top: value[0], right: value[1], bottom: value[2], left: value[1]};
|
||||||
|
}
|
||||||
|
if (value.length === 4) {
|
||||||
|
return {top: value[0], right: value[1], bottom: value[2], left: value[3]};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert an unpacked padding object to a CSS value
|
||||||
|
function paddingToCss(paddingObj) {
|
||||||
|
return paddingObj.top + "px " + paddingObj.right + "px " + paddingObj.bottom + "px " + paddingObj.left + "px";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Makes a number suitable for CSS
|
||||||
|
function px(x) {
|
||||||
|
if (typeof(x) === "number")
|
||||||
|
return x + "px";
|
||||||
|
else
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieves runtime widget sizing information for an element.
|
||||||
|
// The return value is either null, or an object with fill, padding,
|
||||||
|
// defaultWidth, defaultHeight fields.
|
||||||
|
function sizingPolicy(el) {
|
||||||
|
var sizingEl = document.querySelector("script[data-for='" + el.id + "'][type='application/htmlwidget-sizing']");
|
||||||
|
if (!sizingEl)
|
||||||
|
return null;
|
||||||
|
var sp = JSON.parse(sizingEl.textContent || sizingEl.text || "{}");
|
||||||
|
if (viewerMode) {
|
||||||
|
return sp.viewer;
|
||||||
|
} else {
|
||||||
|
return sp.browser;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// @param tasks Array of strings (or falsy value, in which case no-op).
|
||||||
|
// Each element must be a valid JavaScript expression that yields a
|
||||||
|
// function. Or, can be an array of objects with "code" and "data"
|
||||||
|
// properties; in this case, the "code" property should be a string
|
||||||
|
// of JS that's an expr that yields a function, and "data" should be
|
||||||
|
// an object that will be added as an additional argument when that
|
||||||
|
// function is called.
|
||||||
|
// @param target The object that will be "this" for each function
|
||||||
|
// execution.
|
||||||
|
// @param args Array of arguments to be passed to the functions. (The
|
||||||
|
// same arguments will be passed to all functions.)
|
||||||
|
function evalAndRun(tasks, target, args) {
|
||||||
|
if (tasks) {
|
||||||
|
forEach(tasks, function(task) {
|
||||||
|
var theseArgs = args;
|
||||||
|
if (typeof(task) === "object") {
|
||||||
|
theseArgs = theseArgs.concat([task.data]);
|
||||||
|
task = task.code;
|
||||||
|
}
|
||||||
|
var taskFunc = tryEval(task);
|
||||||
|
if (typeof(taskFunc) !== "function") {
|
||||||
|
throw new Error("Task must be a function! Source:\n" + task);
|
||||||
|
}
|
||||||
|
taskFunc.apply(target, theseArgs);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Attempt eval() both with and without enclosing in parentheses.
|
||||||
|
// Note that enclosing coerces a function declaration into
|
||||||
|
// an expression that eval() can parse
|
||||||
|
// (otherwise, a SyntaxError is thrown)
|
||||||
|
function tryEval(code) {
|
||||||
|
var result = null;
|
||||||
|
try {
|
||||||
|
result = eval("(" + code + ")");
|
||||||
|
} catch(error) {
|
||||||
|
if (!(error instanceof SyntaxError)) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
result = eval(code);
|
||||||
|
} catch(e) {
|
||||||
|
if (e instanceof SyntaxError) {
|
||||||
|
throw error;
|
||||||
|
} else {
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function initSizing(el) {
|
||||||
|
var sizing = sizingPolicy(el);
|
||||||
|
if (!sizing)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var cel = document.getElementById("htmlwidget_container");
|
||||||
|
if (!cel)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (typeof(sizing.padding) !== "undefined") {
|
||||||
|
document.body.style.margin = "0";
|
||||||
|
document.body.style.padding = paddingToCss(unpackPadding(sizing.padding));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sizing.fill) {
|
||||||
|
document.body.style.overflow = "hidden";
|
||||||
|
document.body.style.width = "100%";
|
||||||
|
document.body.style.height = "100%";
|
||||||
|
document.documentElement.style.width = "100%";
|
||||||
|
document.documentElement.style.height = "100%";
|
||||||
|
cel.style.position = "absolute";
|
||||||
|
var pad = unpackPadding(sizing.padding);
|
||||||
|
cel.style.top = pad.top + "px";
|
||||||
|
cel.style.right = pad.right + "px";
|
||||||
|
cel.style.bottom = pad.bottom + "px";
|
||||||
|
cel.style.left = pad.left + "px";
|
||||||
|
el.style.width = "100%";
|
||||||
|
el.style.height = "100%";
|
||||||
|
|
||||||
|
return {
|
||||||
|
getWidth: function() { return cel.getBoundingClientRect().width; },
|
||||||
|
getHeight: function() { return cel.getBoundingClientRect().height; }
|
||||||
|
};
|
||||||
|
|
||||||
|
} else {
|
||||||
|
el.style.width = px(sizing.width);
|
||||||
|
el.style.height = px(sizing.height);
|
||||||
|
|
||||||
|
return {
|
||||||
|
getWidth: function() { return cel.getBoundingClientRect().width; },
|
||||||
|
getHeight: function() { return cel.getBoundingClientRect().height; }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default implementations for methods
|
||||||
|
var defaults = {
|
||||||
|
find: function(scope) {
|
||||||
|
return querySelectorAll(scope, "." + this.name);
|
||||||
|
},
|
||||||
|
renderError: function(el, err) {
|
||||||
|
var $el = $(el);
|
||||||
|
|
||||||
|
this.clearError(el);
|
||||||
|
|
||||||
|
// Add all these error classes, as Shiny does
|
||||||
|
var errClass = "shiny-output-error";
|
||||||
|
if (err.type !== null) {
|
||||||
|
// use the classes of the error condition as CSS class names
|
||||||
|
errClass = errClass + " " + $.map(asArray(err.type), function(type) {
|
||||||
|
return errClass + "-" + type;
|
||||||
|
}).join(" ");
|
||||||
|
}
|
||||||
|
errClass = errClass + " htmlwidgets-error";
|
||||||
|
|
||||||
|
// Is el inline or block? If inline or inline-block, just display:none it
|
||||||
|
// and add an inline error.
|
||||||
|
var display = $el.css("display");
|
||||||
|
$el.data("restore-display-mode", display);
|
||||||
|
|
||||||
|
if (display === "inline" || display === "inline-block") {
|
||||||
|
$el.hide();
|
||||||
|
if (err.message !== "") {
|
||||||
|
var errorSpan = $("<span>").addClass(errClass);
|
||||||
|
errorSpan.text(err.message);
|
||||||
|
$el.after(errorSpan);
|
||||||
|
}
|
||||||
|
} else if (display === "block") {
|
||||||
|
// If block, add an error just after the el, set visibility:none on the
|
||||||
|
// el, and position the error to be on top of the el.
|
||||||
|
// Mark it with a unique ID and CSS class so we can remove it later.
|
||||||
|
$el.css("visibility", "hidden");
|
||||||
|
if (err.message !== "") {
|
||||||
|
var errorDiv = $("<div>").addClass(errClass).css("position", "absolute")
|
||||||
|
.css("top", el.offsetTop)
|
||||||
|
.css("left", el.offsetLeft)
|
||||||
|
// setting width can push out the page size, forcing otherwise
|
||||||
|
// unnecessary scrollbars to appear and making it impossible for
|
||||||
|
// the element to shrink; so use max-width instead
|
||||||
|
.css("maxWidth", el.offsetWidth)
|
||||||
|
.css("height", el.offsetHeight);
|
||||||
|
errorDiv.text(err.message);
|
||||||
|
$el.after(errorDiv);
|
||||||
|
|
||||||
|
// Really dumb way to keep the size/position of the error in sync with
|
||||||
|
// the parent element as the window is resized or whatever.
|
||||||
|
var intId = setInterval(function() {
|
||||||
|
if (!errorDiv[0].parentElement) {
|
||||||
|
clearInterval(intId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
errorDiv
|
||||||
|
.css("top", el.offsetTop)
|
||||||
|
.css("left", el.offsetLeft)
|
||||||
|
.css("maxWidth", el.offsetWidth)
|
||||||
|
.css("height", el.offsetHeight);
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
clearError: function(el) {
|
||||||
|
var $el = $(el);
|
||||||
|
var display = $el.data("restore-display-mode");
|
||||||
|
$el.data("restore-display-mode", null);
|
||||||
|
|
||||||
|
if (display === "inline" || display === "inline-block") {
|
||||||
|
if (display)
|
||||||
|
$el.css("display", display);
|
||||||
|
$(el.nextSibling).filter(".htmlwidgets-error").remove();
|
||||||
|
} else if (display === "block"){
|
||||||
|
$el.css("visibility", "inherit");
|
||||||
|
$(el.nextSibling).filter(".htmlwidgets-error").remove();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sizing: {}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Called by widget bindings to register a new type of widget. The definition
|
||||||
|
// object can contain the following properties:
|
||||||
|
// - name (required) - A string indicating the binding name, which will be
|
||||||
|
// used by default as the CSS classname to look for.
|
||||||
|
// - initialize (optional) - A function(el) that will be called once per
|
||||||
|
// widget element; if a value is returned, it will be passed as the third
|
||||||
|
// value to renderValue.
|
||||||
|
// - renderValue (required) - A function(el, data, initValue) that will be
|
||||||
|
// called with data. Static contexts will cause this to be called once per
|
||||||
|
// element; Shiny apps will cause this to be called multiple times per
|
||||||
|
// element, as the data changes.
|
||||||
|
window.HTMLWidgets.widget = function(definition) {
|
||||||
|
if (!definition.name) {
|
||||||
|
throw new Error("Widget must have a name");
|
||||||
|
}
|
||||||
|
if (!definition.type) {
|
||||||
|
throw new Error("Widget must have a type");
|
||||||
|
}
|
||||||
|
// Currently we only support output widgets
|
||||||
|
if (definition.type !== "output") {
|
||||||
|
throw new Error("Unrecognized widget type '" + definition.type + "'");
|
||||||
|
}
|
||||||
|
// TODO: Verify that .name is a valid CSS classname
|
||||||
|
|
||||||
|
// Support new-style instance-bound definitions. Old-style class-bound
|
||||||
|
// definitions have one widget "object" per widget per type/class of
|
||||||
|
// widget; the renderValue and resize methods on such widget objects
|
||||||
|
// take el and instance arguments, because the widget object can't
|
||||||
|
// store them. New-style instance-bound definitions have one widget
|
||||||
|
// object per widget instance; the definition that's passed in doesn't
|
||||||
|
// provide renderValue or resize methods at all, just the single method
|
||||||
|
// factory(el, width, height)
|
||||||
|
// which returns an object that has renderValue(x) and resize(w, h).
|
||||||
|
// This enables a far more natural programming style for the widget
|
||||||
|
// author, who can store per-instance state using either OO-style
|
||||||
|
// instance fields or functional-style closure variables (I guess this
|
||||||
|
// is in contrast to what can only be called C-style pseudo-OO which is
|
||||||
|
// what we required before).
|
||||||
|
if (definition.factory) {
|
||||||
|
definition = createLegacyDefinitionAdapter(definition);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!definition.renderValue) {
|
||||||
|
throw new Error("Widget must have a renderValue function");
|
||||||
|
}
|
||||||
|
|
||||||
|
// For static rendering (non-Shiny), use a simple widget registration
|
||||||
|
// scheme. We also use this scheme for Shiny apps/documents that also
|
||||||
|
// contain static widgets.
|
||||||
|
window.HTMLWidgets.widgets = window.HTMLWidgets.widgets || [];
|
||||||
|
// Merge defaults into the definition; don't mutate the original definition.
|
||||||
|
var staticBinding = extend({}, defaults, definition);
|
||||||
|
overrideMethod(staticBinding, "find", function(superfunc) {
|
||||||
|
return function(scope) {
|
||||||
|
var results = superfunc(scope);
|
||||||
|
// Filter out Shiny outputs, we only want the static kind
|
||||||
|
return filterByClass(results, "html-widget-output", false);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
window.HTMLWidgets.widgets.push(staticBinding);
|
||||||
|
|
||||||
|
if (shinyMode) {
|
||||||
|
// Shiny is running. Register the definition with an output binding.
|
||||||
|
// The definition itself will not be the output binding, instead
|
||||||
|
// we will make an output binding object that delegates to the
|
||||||
|
// definition. This is because we foolishly used the same method
|
||||||
|
// name (renderValue) for htmlwidgets definition and Shiny bindings
|
||||||
|
// but they actually have quite different semantics (the Shiny
|
||||||
|
// bindings receive data that includes lots of metadata that it
|
||||||
|
// strips off before calling htmlwidgets renderValue). We can't
|
||||||
|
// just ignore the difference because in some widgets it's helpful
|
||||||
|
// to call this.renderValue() from inside of resize(), and if
|
||||||
|
// we're not delegating, then that call will go to the Shiny
|
||||||
|
// version instead of the htmlwidgets version.
|
||||||
|
|
||||||
|
// Merge defaults with definition, without mutating either.
|
||||||
|
var bindingDef = extend({}, defaults, definition);
|
||||||
|
|
||||||
|
// This object will be our actual Shiny binding.
|
||||||
|
var shinyBinding = new Shiny.OutputBinding();
|
||||||
|
|
||||||
|
// With a few exceptions, we'll want to simply use the bindingDef's
|
||||||
|
// version of methods if they are available, otherwise fall back to
|
||||||
|
// Shiny's defaults. NOTE: If Shiny's output bindings gain additional
|
||||||
|
// methods in the future, and we want them to be overrideable by
|
||||||
|
// HTMLWidget binding definitions, then we'll need to add them to this
|
||||||
|
// list.
|
||||||
|
delegateMethod(shinyBinding, bindingDef, "getId");
|
||||||
|
delegateMethod(shinyBinding, bindingDef, "onValueChange");
|
||||||
|
delegateMethod(shinyBinding, bindingDef, "onValueError");
|
||||||
|
delegateMethod(shinyBinding, bindingDef, "renderError");
|
||||||
|
delegateMethod(shinyBinding, bindingDef, "clearError");
|
||||||
|
delegateMethod(shinyBinding, bindingDef, "showProgress");
|
||||||
|
|
||||||
|
// The find, renderValue, and resize are handled differently, because we
|
||||||
|
// want to actually decorate the behavior of the bindingDef methods.
|
||||||
|
|
||||||
|
shinyBinding.find = function(scope) {
|
||||||
|
var results = bindingDef.find(scope);
|
||||||
|
|
||||||
|
// Only return elements that are Shiny outputs, not static ones
|
||||||
|
var dynamicResults = results.filter(".html-widget-output");
|
||||||
|
|
||||||
|
// It's possible that whatever caused Shiny to think there might be
|
||||||
|
// new dynamic outputs, also caused there to be new static outputs.
|
||||||
|
// Since there might be lots of different htmlwidgets bindings, we
|
||||||
|
// schedule execution for later--no need to staticRender multiple
|
||||||
|
// times.
|
||||||
|
if (results.length !== dynamicResults.length)
|
||||||
|
scheduleStaticRender();
|
||||||
|
|
||||||
|
return dynamicResults;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Wrap renderValue to handle initialization, which unfortunately isn't
|
||||||
|
// supported natively by Shiny at the time of this writing.
|
||||||
|
|
||||||
|
shinyBinding.renderValue = function(el, data) {
|
||||||
|
Shiny.renderDependencies(data.deps);
|
||||||
|
// Resolve strings marked as javascript literals to objects
|
||||||
|
if (!(data.evals instanceof Array)) data.evals = [data.evals];
|
||||||
|
for (var i = 0; data.evals && i < data.evals.length; i++) {
|
||||||
|
window.HTMLWidgets.evaluateStringMember(data.x, data.evals[i]);
|
||||||
|
}
|
||||||
|
if (!bindingDef.renderOnNullValue) {
|
||||||
|
if (data.x === null) {
|
||||||
|
el.style.visibility = "hidden";
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
el.style.visibility = "inherit";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!elementData(el, "initialized")) {
|
||||||
|
initSizing(el);
|
||||||
|
|
||||||
|
elementData(el, "initialized", true);
|
||||||
|
if (bindingDef.initialize) {
|
||||||
|
var rect = el.getBoundingClientRect();
|
||||||
|
var result = bindingDef.initialize(el, rect.width, rect.height);
|
||||||
|
elementData(el, "init_result", result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bindingDef.renderValue(el, data.x, elementData(el, "init_result"));
|
||||||
|
evalAndRun(data.jsHooks.render, elementData(el, "init_result"), [el, data.x]);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Only override resize if bindingDef implements it
|
||||||
|
if (bindingDef.resize) {
|
||||||
|
shinyBinding.resize = function(el, width, height) {
|
||||||
|
// Shiny can call resize before initialize/renderValue have been
|
||||||
|
// called, which doesn't make sense for widgets.
|
||||||
|
if (elementData(el, "initialized")) {
|
||||||
|
bindingDef.resize(el, width, height, elementData(el, "init_result"));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
Shiny.outputBindings.register(shinyBinding, bindingDef.name);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var scheduleStaticRenderTimerId = null;
|
||||||
|
function scheduleStaticRender() {
|
||||||
|
if (!scheduleStaticRenderTimerId) {
|
||||||
|
scheduleStaticRenderTimerId = setTimeout(function() {
|
||||||
|
scheduleStaticRenderTimerId = null;
|
||||||
|
window.HTMLWidgets.staticRender();
|
||||||
|
}, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Render static widgets after the document finishes loading
|
||||||
|
// Statically render all elements that are of this widget's class
|
||||||
|
window.HTMLWidgets.staticRender = function() {
|
||||||
|
var bindings = window.HTMLWidgets.widgets || [];
|
||||||
|
forEach(bindings, function(binding) {
|
||||||
|
var matches = binding.find(document.documentElement);
|
||||||
|
forEach(matches, function(el) {
|
||||||
|
var sizeObj = initSizing(el, binding);
|
||||||
|
|
||||||
|
var getSize = function(el) {
|
||||||
|
if (sizeObj) {
|
||||||
|
return {w: sizeObj.getWidth(), h: sizeObj.getHeight()}
|
||||||
|
} else {
|
||||||
|
var rect = el.getBoundingClientRect();
|
||||||
|
return {w: rect.width, h: rect.height}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (hasClass(el, "html-widget-static-bound"))
|
||||||
|
return;
|
||||||
|
el.className = el.className + " html-widget-static-bound";
|
||||||
|
|
||||||
|
var initResult;
|
||||||
|
if (binding.initialize) {
|
||||||
|
var size = getSize(el);
|
||||||
|
initResult = binding.initialize(el, size.w, size.h);
|
||||||
|
elementData(el, "init_result", initResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (binding.resize) {
|
||||||
|
var lastSize = getSize(el);
|
||||||
|
var resizeHandler = function(e) {
|
||||||
|
var size = getSize(el);
|
||||||
|
if (size.w === 0 && size.h === 0)
|
||||||
|
return;
|
||||||
|
if (size.w === lastSize.w && size.h === lastSize.h)
|
||||||
|
return;
|
||||||
|
lastSize = size;
|
||||||
|
binding.resize(el, size.w, size.h, initResult);
|
||||||
|
};
|
||||||
|
|
||||||
|
on(window, "resize", resizeHandler);
|
||||||
|
|
||||||
|
// This is needed for cases where we're running in a Shiny
|
||||||
|
// app, but the widget itself is not a Shiny output, but
|
||||||
|
// rather a simple static widget. One example of this is
|
||||||
|
// an rmarkdown document that has runtime:shiny and widget
|
||||||
|
// that isn't in a render function. Shiny only knows to
|
||||||
|
// call resize handlers for Shiny outputs, not for static
|
||||||
|
// widgets, so we do it ourselves.
|
||||||
|
if (window.jQuery) {
|
||||||
|
window.jQuery(document).on(
|
||||||
|
"shown.htmlwidgets shown.bs.tab.htmlwidgets shown.bs.collapse.htmlwidgets",
|
||||||
|
resizeHandler
|
||||||
|
);
|
||||||
|
window.jQuery(document).on(
|
||||||
|
"hidden.htmlwidgets hidden.bs.tab.htmlwidgets hidden.bs.collapse.htmlwidgets",
|
||||||
|
resizeHandler
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is needed for the specific case of ioslides, which
|
||||||
|
// flips slides between display:none and display:block.
|
||||||
|
// Ideally we would not have to have ioslide-specific code
|
||||||
|
// here, but rather have ioslides raise a generic event,
|
||||||
|
// but the rmarkdown package just went to CRAN so the
|
||||||
|
// window to getting that fixed may be long.
|
||||||
|
if (window.addEventListener) {
|
||||||
|
// It's OK to limit this to window.addEventListener
|
||||||
|
// browsers because ioslides itself only supports
|
||||||
|
// such browsers.
|
||||||
|
on(document, "slideenter", resizeHandler);
|
||||||
|
on(document, "slideleave", resizeHandler);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var scriptData = document.querySelector("script[data-for='" + el.id + "'][type='application/json']");
|
||||||
|
if (scriptData) {
|
||||||
|
var data = JSON.parse(scriptData.textContent || scriptData.text);
|
||||||
|
// Resolve strings marked as javascript literals to objects
|
||||||
|
if (!(data.evals instanceof Array)) data.evals = [data.evals];
|
||||||
|
for (var k = 0; data.evals && k < data.evals.length; k++) {
|
||||||
|
window.HTMLWidgets.evaluateStringMember(data.x, data.evals[k]);
|
||||||
|
}
|
||||||
|
binding.renderValue(el, data.x, initResult);
|
||||||
|
evalAndRun(data.jsHooks.render, initResult, [el, data.x]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
invokePostRenderHandlers();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function has_jQuery3() {
|
||||||
|
if (!window.jQuery) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var $version = window.jQuery.fn.jquery;
|
||||||
|
var $major_version = parseInt($version.split(".")[0]);
|
||||||
|
return $major_version >= 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
/ Shiny 1.4 bumped jQuery from 1.x to 3.x which means jQuery's
|
||||||
|
/ on-ready handler (i.e., $(fn)) is now asyncronous (i.e., it now
|
||||||
|
/ really means $(setTimeout(fn)).
|
||||||
|
/ https://jquery.com/upgrade-guide/3.0/#breaking-change-document-ready-handlers-are-now-asynchronous
|
||||||
|
/
|
||||||
|
/ Since Shiny uses $() to schedule initShiny, shiny>=1.4 calls initShiny
|
||||||
|
/ one tick later than it did before, which means staticRender() is
|
||||||
|
/ called renderValue() earlier than (advanced) widget authors might be expecting.
|
||||||
|
/ https://github.com/rstudio/shiny/issues/2630
|
||||||
|
/
|
||||||
|
/ For a concrete example, leaflet has some methods (e.g., updateBounds)
|
||||||
|
/ which reference Shiny methods registered in initShiny (e.g., setInputValue).
|
||||||
|
/ Since leaflet is privy to this life-cycle, it knows to use setTimeout() to
|
||||||
|
/ delay execution of those methods (until Shiny methods are ready)
|
||||||
|
/ https://github.com/rstudio/leaflet/blob/18ec981/javascript/src/index.js#L266-L268
|
||||||
|
/
|
||||||
|
/ Ideally widget authors wouldn't need to use this setTimeout() hack that
|
||||||
|
/ leaflet uses to call Shiny methods on a staticRender(). In the long run,
|
||||||
|
/ the logic initShiny should be broken up so that method registration happens
|
||||||
|
/ right away, but binding happens later.
|
||||||
|
*/
|
||||||
|
function maybeStaticRenderLater() {
|
||||||
|
if (shinyMode && has_jQuery3()) {
|
||||||
|
window.jQuery(window.HTMLWidgets.staticRender);
|
||||||
|
} else {
|
||||||
|
window.HTMLWidgets.staticRender();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (document.addEventListener) {
|
||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
document.removeEventListener("DOMContentLoaded", arguments.callee, false);
|
||||||
|
maybeStaticRenderLater();
|
||||||
|
}, false);
|
||||||
|
} else if (document.attachEvent) {
|
||||||
|
document.attachEvent("onreadystatechange", function() {
|
||||||
|
if (document.readyState === "complete") {
|
||||||
|
document.detachEvent("onreadystatechange", arguments.callee);
|
||||||
|
maybeStaticRenderLater();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
window.HTMLWidgets.getAttachmentUrl = function(depname, key) {
|
||||||
|
// If no key, default to the first item
|
||||||
|
if (typeof(key) === "undefined")
|
||||||
|
key = 1;
|
||||||
|
|
||||||
|
var link = document.getElementById(depname + "-" + key + "-attachment");
|
||||||
|
if (!link) {
|
||||||
|
throw new Error("Attachment " + depname + "/" + key + " not found in document");
|
||||||
|
}
|
||||||
|
return link.getAttribute("href");
|
||||||
|
};
|
||||||
|
|
||||||
|
window.HTMLWidgets.dataframeToD3 = function(df) {
|
||||||
|
var names = [];
|
||||||
|
var length;
|
||||||
|
for (var name in df) {
|
||||||
|
if (df.hasOwnProperty(name))
|
||||||
|
names.push(name);
|
||||||
|
if (typeof(df[name]) !== "object" || typeof(df[name].length) === "undefined") {
|
||||||
|
throw new Error("All fields must be arrays");
|
||||||
|
} else if (typeof(length) !== "undefined" && length !== df[name].length) {
|
||||||
|
throw new Error("All fields must be arrays of the same length");
|
||||||
|
}
|
||||||
|
length = df[name].length;
|
||||||
|
}
|
||||||
|
var results = [];
|
||||||
|
var item;
|
||||||
|
for (var row = 0; row < length; row++) {
|
||||||
|
item = {};
|
||||||
|
for (var col = 0; col < names.length; col++) {
|
||||||
|
item[names[col]] = df[names[col]][row];
|
||||||
|
}
|
||||||
|
results.push(item);
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
};
|
||||||
|
|
||||||
|
window.HTMLWidgets.transposeArray2D = function(array) {
|
||||||
|
if (array.length === 0) return array;
|
||||||
|
var newArray = array[0].map(function(col, i) {
|
||||||
|
return array.map(function(row) {
|
||||||
|
return row[i]
|
||||||
|
})
|
||||||
|
});
|
||||||
|
return newArray;
|
||||||
|
};
|
||||||
|
// Split value at splitChar, but allow splitChar to be escaped
|
||||||
|
// using escapeChar. Any other characters escaped by escapeChar
|
||||||
|
// will be included as usual (including escapeChar itself).
|
||||||
|
function splitWithEscape(value, splitChar, escapeChar) {
|
||||||
|
var results = [];
|
||||||
|
var escapeMode = false;
|
||||||
|
var currentResult = "";
|
||||||
|
for (var pos = 0; pos < value.length; pos++) {
|
||||||
|
if (!escapeMode) {
|
||||||
|
if (value[pos] === splitChar) {
|
||||||
|
results.push(currentResult);
|
||||||
|
currentResult = "";
|
||||||
|
} else if (value[pos] === escapeChar) {
|
||||||
|
escapeMode = true;
|
||||||
|
} else {
|
||||||
|
currentResult += value[pos];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
currentResult += value[pos];
|
||||||
|
escapeMode = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (currentResult !== "") {
|
||||||
|
results.push(currentResult);
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
// Function authored by Yihui/JJ Allaire
|
||||||
|
window.HTMLWidgets.evaluateStringMember = function(o, member) {
|
||||||
|
var parts = splitWithEscape(member, '.', '\\');
|
||||||
|
for (var i = 0, l = parts.length; i < l; i++) {
|
||||||
|
var part = parts[i];
|
||||||
|
// part may be a character or 'numeric' member name
|
||||||
|
if (o !== null && typeof o === "object" && part in o) {
|
||||||
|
if (i == (l - 1)) { // if we are at the end of the line then evalulate
|
||||||
|
if (typeof o[part] === "string")
|
||||||
|
o[part] = tryEval(o[part]);
|
||||||
|
} else { // otherwise continue to next embedded object
|
||||||
|
o = o[part];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Retrieve the HTMLWidget instance (i.e. the return value of an
|
||||||
|
// HTMLWidget binding's initialize() or factory() function)
|
||||||
|
// associated with an element, or null if none.
|
||||||
|
window.HTMLWidgets.getInstance = function(el) {
|
||||||
|
return elementData(el, "init_result");
|
||||||
|
};
|
||||||
|
|
||||||
|
// Finds the first element in the scope that matches the selector,
|
||||||
|
// and returns the HTMLWidget instance (i.e. the return value of
|
||||||
|
// an HTMLWidget binding's initialize() or factory() function)
|
||||||
|
// associated with that element, if any. If no element matches the
|
||||||
|
// selector, or the first matching element has no HTMLWidget
|
||||||
|
// instance associated with it, then null is returned.
|
||||||
|
//
|
||||||
|
// The scope argument is optional, and defaults to window.document.
|
||||||
|
window.HTMLWidgets.find = function(scope, selector) {
|
||||||
|
if (arguments.length == 1) {
|
||||||
|
selector = scope;
|
||||||
|
scope = document;
|
||||||
|
}
|
||||||
|
|
||||||
|
var el = scope.querySelector(selector);
|
||||||
|
if (el === null) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return window.HTMLWidgets.getInstance(el);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Finds all elements in the scope that match the selector, and
|
||||||
|
// returns the HTMLWidget instances (i.e. the return values of
|
||||||
|
// an HTMLWidget binding's initialize() or factory() function)
|
||||||
|
// associated with the elements, in an array. If elements that
|
||||||
|
// match the selector don't have an associated HTMLWidget
|
||||||
|
// instance, the returned array will contain nulls.
|
||||||
|
//
|
||||||
|
// The scope argument is optional, and defaults to window.document.
|
||||||
|
window.HTMLWidgets.findAll = function(scope, selector) {
|
||||||
|
if (arguments.length == 1) {
|
||||||
|
selector = scope;
|
||||||
|
scope = document;
|
||||||
|
}
|
||||||
|
|
||||||
|
var nodes = scope.querySelectorAll(selector);
|
||||||
|
var results = [];
|
||||||
|
for (var i = 0; i < nodes.length; i++) {
|
||||||
|
results.push(window.HTMLWidgets.getInstance(nodes[i]));
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
};
|
||||||
|
|
||||||
|
var postRenderHandlers = [];
|
||||||
|
function invokePostRenderHandlers() {
|
||||||
|
while (postRenderHandlers.length) {
|
||||||
|
var handler = postRenderHandlers.shift();
|
||||||
|
if (handler) {
|
||||||
|
handler();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Register the given callback function to be invoked after the
|
||||||
|
// next time static widgets are rendered.
|
||||||
|
window.HTMLWidgets.addPostRenderHandler = function(callback) {
|
||||||
|
postRenderHandlers.push(callback);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Takes a new-style instance-bound definition, and returns an
|
||||||
|
// old-style class-bound definition. This saves us from having
|
||||||
|
// to rewrite all the logic in this file to accomodate both
|
||||||
|
// types of definitions.
|
||||||
|
function createLegacyDefinitionAdapter(defn) {
|
||||||
|
var result = {
|
||||||
|
name: defn.name,
|
||||||
|
type: defn.type,
|
||||||
|
initialize: function(el, width, height) {
|
||||||
|
return defn.factory(el, width, height);
|
||||||
|
},
|
||||||
|
renderValue: function(el, x, instance) {
|
||||||
|
return instance.renderValue(x);
|
||||||
|
},
|
||||||
|
resize: function(el, width, height, instance) {
|
||||||
|
return instance.resize(width, height);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (defn.find)
|
||||||
|
result.find = defn.find;
|
||||||
|
if (defn.renderError)
|
||||||
|
result.renderError = defn.renderError;
|
||||||
|
if (defn.clearError)
|
||||||
|
result.clearError = defn.clearError;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
})();
|
5
_freeze/site_libs/jquery-1.12.4/jquery.min.js
vendored
Normal file
5
_freeze/site_libs/jquery-1.12.4/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
_freeze/site_libs/leaflet-1.3.1/images/layers-2x.png
Normal file
BIN
_freeze/site_libs/leaflet-1.3.1/images/layers-2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
_freeze/site_libs/leaflet-1.3.1/images/layers.png
Normal file
BIN
_freeze/site_libs/leaflet-1.3.1/images/layers.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 696 B |
BIN
_freeze/site_libs/leaflet-1.3.1/images/marker-icon-2x.png
Normal file
BIN
_freeze/site_libs/leaflet-1.3.1/images/marker-icon-2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
BIN
_freeze/site_libs/leaflet-1.3.1/images/marker-icon.png
Normal file
BIN
_freeze/site_libs/leaflet-1.3.1/images/marker-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
_freeze/site_libs/leaflet-1.3.1/images/marker-shadow.png
Normal file
BIN
_freeze/site_libs/leaflet-1.3.1/images/marker-shadow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 618 B |
636
_freeze/site_libs/leaflet-1.3.1/leaflet.css
Normal file
636
_freeze/site_libs/leaflet-1.3.1/leaflet.css
Normal file
|
@ -0,0 +1,636 @@
|
||||||
|
/* required styles */
|
||||||
|
|
||||||
|
.leaflet-pane,
|
||||||
|
.leaflet-tile,
|
||||||
|
.leaflet-marker-icon,
|
||||||
|
.leaflet-marker-shadow,
|
||||||
|
.leaflet-tile-container,
|
||||||
|
.leaflet-pane > svg,
|
||||||
|
.leaflet-pane > canvas,
|
||||||
|
.leaflet-zoom-box,
|
||||||
|
.leaflet-image-layer,
|
||||||
|
.leaflet-layer {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.leaflet-container {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.leaflet-tile,
|
||||||
|
.leaflet-marker-icon,
|
||||||
|
.leaflet-marker-shadow {
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
-webkit-user-drag: none;
|
||||||
|
}
|
||||||
|
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
|
||||||
|
.leaflet-safari .leaflet-tile {
|
||||||
|
image-rendering: -webkit-optimize-contrast;
|
||||||
|
}
|
||||||
|
/* hack that prevents hw layers "stretching" when loading new tiles */
|
||||||
|
.leaflet-safari .leaflet-tile-container {
|
||||||
|
width: 1600px;
|
||||||
|
height: 1600px;
|
||||||
|
-webkit-transform-origin: 0 0;
|
||||||
|
}
|
||||||
|
.leaflet-marker-icon,
|
||||||
|
.leaflet-marker-shadow {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
|
||||||
|
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
|
||||||
|
.leaflet-container .leaflet-overlay-pane svg,
|
||||||
|
.leaflet-container .leaflet-marker-pane img,
|
||||||
|
.leaflet-container .leaflet-shadow-pane img,
|
||||||
|
.leaflet-container .leaflet-tile-pane img,
|
||||||
|
.leaflet-container img.leaflet-image-layer {
|
||||||
|
max-width: none !important;
|
||||||
|
max-height: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leaflet-container.leaflet-touch-zoom {
|
||||||
|
-ms-touch-action: pan-x pan-y;
|
||||||
|
touch-action: pan-x pan-y;
|
||||||
|
}
|
||||||
|
.leaflet-container.leaflet-touch-drag {
|
||||||
|
-ms-touch-action: pinch-zoom;
|
||||||
|
/* Fallback for FF which doesn't support pinch-zoom */
|
||||||
|
touch-action: none;
|
||||||
|
touch-action: pinch-zoom;
|
||||||
|
}
|
||||||
|
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
|
||||||
|
-ms-touch-action: none;
|
||||||
|
touch-action: none;
|
||||||
|
}
|
||||||
|
.leaflet-container {
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
}
|
||||||
|
.leaflet-container a {
|
||||||
|
-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
|
||||||
|
}
|
||||||
|
.leaflet-tile {
|
||||||
|
filter: inherit;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
.leaflet-tile-loaded {
|
||||||
|
visibility: inherit;
|
||||||
|
}
|
||||||
|
.leaflet-zoom-box {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
z-index: 800;
|
||||||
|
}
|
||||||
|
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
|
||||||
|
.leaflet-overlay-pane svg {
|
||||||
|
-moz-user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leaflet-pane { z-index: 400; }
|
||||||
|
|
||||||
|
.leaflet-tile-pane { z-index: 200; }
|
||||||
|
.leaflet-overlay-pane { z-index: 400; }
|
||||||
|
.leaflet-shadow-pane { z-index: 500; }
|
||||||
|
.leaflet-marker-pane { z-index: 600; }
|
||||||
|
.leaflet-tooltip-pane { z-index: 650; }
|
||||||
|
.leaflet-popup-pane { z-index: 700; }
|
||||||
|
|
||||||
|
.leaflet-map-pane canvas { z-index: 100; }
|
||||||
|
.leaflet-map-pane svg { z-index: 200; }
|
||||||
|
|
||||||
|
.leaflet-vml-shape {
|
||||||
|
width: 1px;
|
||||||
|
height: 1px;
|
||||||
|
}
|
||||||
|
.lvml {
|
||||||
|
behavior: url(#default#VML);
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* control positioning */
|
||||||
|
|
||||||
|
.leaflet-control {
|
||||||
|
position: relative;
|
||||||
|
z-index: 800;
|
||||||
|
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
.leaflet-top,
|
||||||
|
.leaflet-bottom {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1000;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
.leaflet-top {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.leaflet-right {
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
.leaflet-bottom {
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
.leaflet-left {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.leaflet-control {
|
||||||
|
float: left;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
.leaflet-right .leaflet-control {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.leaflet-top .leaflet-control {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.leaflet-bottom .leaflet-control {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.leaflet-left .leaflet-control {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
.leaflet-right .leaflet-control {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* zoom and fade animations */
|
||||||
|
|
||||||
|
.leaflet-fade-anim .leaflet-tile {
|
||||||
|
will-change: opacity;
|
||||||
|
}
|
||||||
|
.leaflet-fade-anim .leaflet-popup {
|
||||||
|
opacity: 0;
|
||||||
|
-webkit-transition: opacity 0.2s linear;
|
||||||
|
-moz-transition: opacity 0.2s linear;
|
||||||
|
-o-transition: opacity 0.2s linear;
|
||||||
|
transition: opacity 0.2s linear;
|
||||||
|
}
|
||||||
|
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.leaflet-zoom-animated {
|
||||||
|
-webkit-transform-origin: 0 0;
|
||||||
|
-ms-transform-origin: 0 0;
|
||||||
|
transform-origin: 0 0;
|
||||||
|
}
|
||||||
|
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||||||
|
will-change: transform;
|
||||||
|
}
|
||||||
|
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||||||
|
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||||
|
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||||
|
-o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||||
|
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||||
|
}
|
||||||
|
.leaflet-zoom-anim .leaflet-tile,
|
||||||
|
.leaflet-pan-anim .leaflet-tile {
|
||||||
|
-webkit-transition: none;
|
||||||
|
-moz-transition: none;
|
||||||
|
-o-transition: none;
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leaflet-zoom-anim .leaflet-zoom-hide {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* cursors */
|
||||||
|
|
||||||
|
.leaflet-interactive {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.leaflet-grab {
|
||||||
|
cursor: -webkit-grab;
|
||||||
|
cursor: -moz-grab;
|
||||||
|
}
|
||||||
|
.leaflet-crosshair,
|
||||||
|
.leaflet-crosshair .leaflet-interactive {
|
||||||
|
cursor: crosshair;
|
||||||
|
}
|
||||||
|
.leaflet-popup-pane,
|
||||||
|
.leaflet-control {
|
||||||
|
cursor: auto;
|
||||||
|
}
|
||||||
|
.leaflet-dragging .leaflet-grab,
|
||||||
|
.leaflet-dragging .leaflet-grab .leaflet-interactive,
|
||||||
|
.leaflet-dragging .leaflet-marker-draggable {
|
||||||
|
cursor: move;
|
||||||
|
cursor: -webkit-grabbing;
|
||||||
|
cursor: -moz-grabbing;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* marker & overlays interactivity */
|
||||||
|
.leaflet-marker-icon,
|
||||||
|
.leaflet-marker-shadow,
|
||||||
|
.leaflet-image-layer,
|
||||||
|
.leaflet-pane > svg path,
|
||||||
|
.leaflet-tile-container {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leaflet-marker-icon.leaflet-interactive,
|
||||||
|
.leaflet-image-layer.leaflet-interactive,
|
||||||
|
.leaflet-pane > svg path.leaflet-interactive {
|
||||||
|
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* visual tweaks */
|
||||||
|
|
||||||
|
.leaflet-container {
|
||||||
|
background: #ddd;
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
.leaflet-container a {
|
||||||
|
color: #0078A8;
|
||||||
|
}
|
||||||
|
.leaflet-container a.leaflet-active {
|
||||||
|
outline: 2px solid orange;
|
||||||
|
}
|
||||||
|
.leaflet-zoom-box {
|
||||||
|
border: 2px dotted #38f;
|
||||||
|
background: rgba(255,255,255,0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* general typography */
|
||||||
|
.leaflet-container {
|
||||||
|
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* general toolbar styles */
|
||||||
|
|
||||||
|
.leaflet-bar {
|
||||||
|
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.leaflet-bar a,
|
||||||
|
.leaflet-bar a:hover {
|
||||||
|
background-color: #fff;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
line-height: 26px;
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
.leaflet-bar a,
|
||||||
|
.leaflet-control-layers-toggle {
|
||||||
|
background-position: 50% 50%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.leaflet-bar a:hover {
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
}
|
||||||
|
.leaflet-bar a:first-child {
|
||||||
|
border-top-left-radius: 4px;
|
||||||
|
border-top-right-radius: 4px;
|
||||||
|
}
|
||||||
|
.leaflet-bar a:last-child {
|
||||||
|
border-bottom-left-radius: 4px;
|
||||||
|
border-bottom-right-radius: 4px;
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
.leaflet-bar a.leaflet-disabled {
|
||||||
|
cursor: default;
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
color: #bbb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leaflet-touch .leaflet-bar a {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
.leaflet-touch .leaflet-bar a:first-child {
|
||||||
|
border-top-left-radius: 2px;
|
||||||
|
border-top-right-radius: 2px;
|
||||||
|
}
|
||||||
|
.leaflet-touch .leaflet-bar a:last-child {
|
||||||
|
border-bottom-left-radius: 2px;
|
||||||
|
border-bottom-right-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* zoom control */
|
||||||
|
|
||||||
|
.leaflet-control-zoom-in,
|
||||||
|
.leaflet-control-zoom-out {
|
||||||
|
font: bold 18px 'Lucida Console', Monaco, monospace;
|
||||||
|
text-indent: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* layers control */
|
||||||
|
|
||||||
|
.leaflet-control-layers {
|
||||||
|
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
.leaflet-control-layers-toggle {
|
||||||
|
background-image: url(images/layers.png);
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
}
|
||||||
|
.leaflet-retina .leaflet-control-layers-toggle {
|
||||||
|
background-image: url(images/layers-2x.png);
|
||||||
|
background-size: 26px 26px;
|
||||||
|
}
|
||||||
|
.leaflet-touch .leaflet-control-layers-toggle {
|
||||||
|
width: 44px;
|
||||||
|
height: 44px;
|
||||||
|
}
|
||||||
|
.leaflet-control-layers .leaflet-control-layers-list,
|
||||||
|
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.leaflet-control-layers-expanded .leaflet-control-layers-list {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.leaflet-control-layers-expanded {
|
||||||
|
padding: 6px 10px 6px 6px;
|
||||||
|
color: #333;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
.leaflet-control-layers-scrollbar {
|
||||||
|
overflow-y: scroll;
|
||||||
|
overflow-x: hidden;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
.leaflet-control-layers-selector {
|
||||||
|
margin-top: 2px;
|
||||||
|
position: relative;
|
||||||
|
top: 1px;
|
||||||
|
}
|
||||||
|
.leaflet-control-layers label {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.leaflet-control-layers-separator {
|
||||||
|
height: 0;
|
||||||
|
border-top: 1px solid #ddd;
|
||||||
|
margin: 5px -10px 5px -6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Default icon URLs */
|
||||||
|
.leaflet-default-icon-path {
|
||||||
|
background-image: url(images/marker-icon.png);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* attribution and scale controls */
|
||||||
|
|
||||||
|
.leaflet-container .leaflet-control-attribution {
|
||||||
|
background: #fff;
|
||||||
|
background: rgba(255, 255, 255, 0.7);
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.leaflet-control-attribution,
|
||||||
|
.leaflet-control-scale-line {
|
||||||
|
padding: 0 5px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.leaflet-control-attribution a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.leaflet-control-attribution a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
.leaflet-container .leaflet-control-attribution,
|
||||||
|
.leaflet-container .leaflet-control-scale {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
.leaflet-left .leaflet-control-scale {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
.leaflet-bottom .leaflet-control-scale {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
.leaflet-control-scale-line {
|
||||||
|
border: 2px solid #777;
|
||||||
|
border-top: none;
|
||||||
|
line-height: 1.1;
|
||||||
|
padding: 2px 5px 1px;
|
||||||
|
font-size: 11px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
background: #fff;
|
||||||
|
background: rgba(255, 255, 255, 0.5);
|
||||||
|
}
|
||||||
|
.leaflet-control-scale-line:not(:first-child) {
|
||||||
|
border-top: 2px solid #777;
|
||||||
|
border-bottom: none;
|
||||||
|
margin-top: -2px;
|
||||||
|
}
|
||||||
|
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
|
||||||
|
border-bottom: 2px solid #777;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leaflet-touch .leaflet-control-attribution,
|
||||||
|
.leaflet-touch .leaflet-control-layers,
|
||||||
|
.leaflet-touch .leaflet-bar {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
.leaflet-touch .leaflet-control-layers,
|
||||||
|
.leaflet-touch .leaflet-bar {
|
||||||
|
border: 2px solid rgba(0,0,0,0.2);
|
||||||
|
background-clip: padding-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* popup */
|
||||||
|
|
||||||
|
.leaflet-popup {
|
||||||
|
position: absolute;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.leaflet-popup-content-wrapper {
|
||||||
|
padding: 1px;
|
||||||
|
text-align: left;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
.leaflet-popup-content {
|
||||||
|
margin: 13px 19px;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
.leaflet-popup-content p {
|
||||||
|
margin: 18px 0;
|
||||||
|
}
|
||||||
|
.leaflet-popup-tip-container {
|
||||||
|
width: 40px;
|
||||||
|
height: 20px;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -20px;
|
||||||
|
overflow: hidden;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
.leaflet-popup-tip {
|
||||||
|
width: 17px;
|
||||||
|
height: 17px;
|
||||||
|
padding: 1px;
|
||||||
|
|
||||||
|
margin: -10px auto 0;
|
||||||
|
|
||||||
|
-webkit-transform: rotate(45deg);
|
||||||
|
-moz-transform: rotate(45deg);
|
||||||
|
-ms-transform: rotate(45deg);
|
||||||
|
-o-transform: rotate(45deg);
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
.leaflet-popup-content-wrapper,
|
||||||
|
.leaflet-popup-tip {
|
||||||
|
background: white;
|
||||||
|
color: #333;
|
||||||
|
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
|
||||||
|
}
|
||||||
|
.leaflet-container a.leaflet-popup-close-button {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 4px 4px 0 0;
|
||||||
|
border: none;
|
||||||
|
text-align: center;
|
||||||
|
width: 18px;
|
||||||
|
height: 14px;
|
||||||
|
font: 16px/14px Tahoma, Verdana, sans-serif;
|
||||||
|
color: #c3c3c3;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
.leaflet-container a.leaflet-popup-close-button:hover {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
.leaflet-popup-scrolled {
|
||||||
|
overflow: auto;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
border-top: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leaflet-oldie .leaflet-popup-content-wrapper {
|
||||||
|
zoom: 1;
|
||||||
|
}
|
||||||
|
.leaflet-oldie .leaflet-popup-tip {
|
||||||
|
width: 24px;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
||||||
|
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
||||||
|
}
|
||||||
|
.leaflet-oldie .leaflet-popup-tip-container {
|
||||||
|
margin-top: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leaflet-oldie .leaflet-control-zoom,
|
||||||
|
.leaflet-oldie .leaflet-control-layers,
|
||||||
|
.leaflet-oldie .leaflet-popup-content-wrapper,
|
||||||
|
.leaflet-oldie .leaflet-popup-tip {
|
||||||
|
border: 1px solid #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* div icon */
|
||||||
|
|
||||||
|
.leaflet-div-icon {
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Tooltip */
|
||||||
|
/* Base styles for the element that has a tooltip */
|
||||||
|
.leaflet-tooltip {
|
||||||
|
position: absolute;
|
||||||
|
padding: 6px;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #fff;
|
||||||
|
border-radius: 3px;
|
||||||
|
color: #222;
|
||||||
|
white-space: nowrap;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
pointer-events: none;
|
||||||
|
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
|
||||||
|
}
|
||||||
|
.leaflet-tooltip.leaflet-clickable {
|
||||||
|
cursor: pointer;
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
.leaflet-tooltip-top:before,
|
||||||
|
.leaflet-tooltip-bottom:before,
|
||||||
|
.leaflet-tooltip-left:before,
|
||||||
|
.leaflet-tooltip-right:before {
|
||||||
|
position: absolute;
|
||||||
|
pointer-events: none;
|
||||||
|
border: 6px solid transparent;
|
||||||
|
background: transparent;
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Directions */
|
||||||
|
|
||||||
|
.leaflet-tooltip-bottom {
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
|
.leaflet-tooltip-top {
|
||||||
|
margin-top: -6px;
|
||||||
|
}
|
||||||
|
.leaflet-tooltip-bottom:before,
|
||||||
|
.leaflet-tooltip-top:before {
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -6px;
|
||||||
|
}
|
||||||
|
.leaflet-tooltip-top:before {
|
||||||
|
bottom: 0;
|
||||||
|
margin-bottom: -12px;
|
||||||
|
border-top-color: #fff;
|
||||||
|
}
|
||||||
|
.leaflet-tooltip-bottom:before {
|
||||||
|
top: 0;
|
||||||
|
margin-top: -12px;
|
||||||
|
margin-left: -6px;
|
||||||
|
border-bottom-color: #fff;
|
||||||
|
}
|
||||||
|
.leaflet-tooltip-left {
|
||||||
|
margin-left: -6px;
|
||||||
|
}
|
||||||
|
.leaflet-tooltip-right {
|
||||||
|
margin-left: 6px;
|
||||||
|
}
|
||||||
|
.leaflet-tooltip-left:before,
|
||||||
|
.leaflet-tooltip-right:before {
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -6px;
|
||||||
|
}
|
||||||
|
.leaflet-tooltip-left:before {
|
||||||
|
right: 0;
|
||||||
|
margin-right: -12px;
|
||||||
|
border-left-color: #fff;
|
||||||
|
}
|
||||||
|
.leaflet-tooltip-right:before {
|
||||||
|
left: 0;
|
||||||
|
margin-left: -12px;
|
||||||
|
border-right-color: #fff;
|
||||||
|
}
|
5
_freeze/site_libs/leaflet-1.3.1/leaflet.js
Normal file
5
_freeze/site_libs/leaflet-1.3.1/leaflet.js
Normal file
File diff suppressed because one or more lines are too long
2785
_freeze/site_libs/leaflet-binding-2.1.2/leaflet.js
Normal file
2785
_freeze/site_libs/leaflet-binding-2.1.2/leaflet.js
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,855 @@
|
||||||
|
(function (root, factory) {
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
// AMD. Register as an anonymous module.
|
||||||
|
define(['leaflet'], factory);
|
||||||
|
} else if (typeof modules === 'object' && module.exports) {
|
||||||
|
// define a Common JS module that relies on 'leaflet'
|
||||||
|
module.exports = factory(require('leaflet'));
|
||||||
|
} else {
|
||||||
|
// Assume Leaflet is loaded into global object L already
|
||||||
|
factory(L);
|
||||||
|
}
|
||||||
|
}(this, function (L) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
L.TileLayer.Provider = L.TileLayer.extend({
|
||||||
|
initialize: function (arg, options) {
|
||||||
|
var providers = L.TileLayer.Provider.providers;
|
||||||
|
|
||||||
|
var parts = arg.split('.');
|
||||||
|
|
||||||
|
var providerName = parts[0];
|
||||||
|
var variantName = parts[1];
|
||||||
|
|
||||||
|
if (!providers[providerName]) {
|
||||||
|
throw 'No such provider (' + providerName + ')';
|
||||||
|
}
|
||||||
|
|
||||||
|
var provider = {
|
||||||
|
url: providers[providerName].url,
|
||||||
|
options: providers[providerName].options
|
||||||
|
};
|
||||||
|
|
||||||
|
// overwrite values in provider from variant.
|
||||||
|
if (variantName && 'variants' in providers[providerName]) {
|
||||||
|
if (!(variantName in providers[providerName].variants)) {
|
||||||
|
throw 'No such variant of ' + providerName + ' (' + variantName + ')';
|
||||||
|
}
|
||||||
|
var variant = providers[providerName].variants[variantName];
|
||||||
|
var variantOptions;
|
||||||
|
if (typeof variant === 'string') {
|
||||||
|
variantOptions = {
|
||||||
|
variant: variant
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
variantOptions = variant.options;
|
||||||
|
}
|
||||||
|
provider = {
|
||||||
|
url: variant.url || provider.url,
|
||||||
|
options: L.Util.extend({}, provider.options, variantOptions)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// replace attribution placeholders with their values from toplevel provider attribution,
|
||||||
|
// recursively
|
||||||
|
var attributionReplacer = function (attr) {
|
||||||
|
if (attr.indexOf('{attribution.') === -1) {
|
||||||
|
return attr;
|
||||||
|
}
|
||||||
|
return attr.replace(/\{attribution.(\w*)\}/g,
|
||||||
|
function (match, attributionName) {
|
||||||
|
return attributionReplacer(providers[attributionName].options.attribution);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
provider.options.attribution = attributionReplacer(provider.options.attribution);
|
||||||
|
|
||||||
|
// Compute final options combining provider options with any user overrides
|
||||||
|
var layerOpts = L.Util.extend({}, provider.options, options);
|
||||||
|
L.TileLayer.prototype.initialize.call(this, provider.url, layerOpts);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Definition of providers.
|
||||||
|
* see http://leafletjs.com/reference.html#tilelayer for options in the options map.
|
||||||
|
*/
|
||||||
|
|
||||||
|
L.TileLayer.Provider.providers = {
|
||||||
|
OpenStreetMap: {
|
||||||
|
url: '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
maxZoom: 19,
|
||||||
|
attribution:
|
||||||
|
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
Mapnik: {},
|
||||||
|
DE: {
|
||||||
|
url: '//{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
maxZoom: 18
|
||||||
|
}
|
||||||
|
},
|
||||||
|
CH: {
|
||||||
|
url: '//tile.osm.ch/switzerland/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
maxZoom: 18,
|
||||||
|
bounds: [[45, 5], [48, 11]]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
France: {
|
||||||
|
url: '//{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
maxZoom: 20,
|
||||||
|
attribution: '© Openstreetmap France | {attribution.OpenStreetMap}'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HOT: {
|
||||||
|
url: '//{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
attribution:
|
||||||
|
'{attribution.OpenStreetMap}, ' +
|
||||||
|
'Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> ' +
|
||||||
|
'hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
BZH: {
|
||||||
|
url: '//tile.openstreetmap.bzh/br/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
attribution: '{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://www.openstreetmap.bzh/" target="_blank">Breton OpenStreetMap Team</a>',
|
||||||
|
bounds: [[46.2, -5.5], [50, 0.7]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
OpenSeaMap: {
|
||||||
|
url: '//tiles.openseamap.org/seamark/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
attribution: 'Map data: © <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
OpenPtMap: {
|
||||||
|
url: 'http://openptmap.org/tiles/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
maxZoom: 17,
|
||||||
|
attribution: 'Map data: © <a href="http://www.openptmap.org">OpenPtMap</a> contributors'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
OpenTopoMap: {
|
||||||
|
url: 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
maxZoom: 17,
|
||||||
|
attribution: 'Map data: {attribution.OpenStreetMap}, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: © <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
OpenRailwayMap: {
|
||||||
|
url: 'https://{s}.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
maxZoom: 19,
|
||||||
|
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © <a href="https://www.OpenRailwayMap.org">OpenRailwayMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
OpenFireMap: {
|
||||||
|
url: 'http://openfiremap.org/hytiles/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
maxZoom: 19,
|
||||||
|
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © <a href="http://www.openfiremap.org">OpenFireMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
SafeCast: {
|
||||||
|
url: '//s3.amazonaws.com/te512.safecast.org/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
maxZoom: 16,
|
||||||
|
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © <a href="https://blog.safecast.org/about/">SafeCast</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Thunderforest: {
|
||||||
|
url: 'https://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}',
|
||||||
|
options: {
|
||||||
|
attribution:
|
||||||
|
'© <a href="http://www.thunderforest.com/">Thunderforest</a>, {attribution.OpenStreetMap}',
|
||||||
|
variant: 'cycle',
|
||||||
|
apikey: '<insert your api key here>',
|
||||||
|
maxZoom: 22
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
OpenCycleMap: 'cycle',
|
||||||
|
Transport: {
|
||||||
|
options: {
|
||||||
|
variant: 'transport'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
TransportDark: {
|
||||||
|
options: {
|
||||||
|
variant: 'transport-dark'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
SpinalMap: {
|
||||||
|
options: {
|
||||||
|
variant: 'spinal-map'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Landscape: 'landscape',
|
||||||
|
Outdoors: 'outdoors',
|
||||||
|
Pioneer: 'pioneer',
|
||||||
|
MobileAtlas: 'mobile-atlas',
|
||||||
|
Neighbourhood: 'neighbourhood'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
OpenMapSurfer: {
|
||||||
|
url: 'https://maps.heigit.org/openmapsurfer/tiles/{variant}/webmercator/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
maxZoom: 19,
|
||||||
|
variant: 'roads',
|
||||||
|
attribution: 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> | Map data '
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
Roads: {
|
||||||
|
options: {
|
||||||
|
variant: 'roads',
|
||||||
|
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Hybrid: {
|
||||||
|
options: {
|
||||||
|
variant: 'hybrid',
|
||||||
|
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
AdminBounds: {
|
||||||
|
options: {
|
||||||
|
variant: 'adminb',
|
||||||
|
maxZoom: 18,
|
||||||
|
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ContourLines: {
|
||||||
|
options: {
|
||||||
|
variant: 'asterc',
|
||||||
|
maxZoom: 18,
|
||||||
|
minZoom: 13,
|
||||||
|
attribution: '{attribution.OpenMapSurfer} <a href="https://lpdaac.usgs.gov/products/aster_policies">ASTER GDEM</a>'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Hillshade: {
|
||||||
|
options: {
|
||||||
|
variant: 'asterh',
|
||||||
|
maxZoom: 18,
|
||||||
|
attribution: '{attribution.OpenMapSurfer} <a href="https://lpdaac.usgs.gov/products/aster_policies">ASTER GDEM</a>, <a href="http://srtm.csi.cgiar.org/">SRTM</a>'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ElementsAtRisk: {
|
||||||
|
options: {
|
||||||
|
variant: 'elements_at_risk',
|
||||||
|
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Hydda: {
|
||||||
|
url: '//{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
maxZoom: 18,
|
||||||
|
variant: 'full',
|
||||||
|
attribution: 'Tiles courtesy of <a href="http://openstreetmap.se/" target="_blank">OpenStreetMap Sweden</a> — Map data {attribution.OpenStreetMap}'
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
Full: 'full',
|
||||||
|
Base: 'base',
|
||||||
|
RoadsAndLabels: 'roads_and_labels'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
MapBox: {
|
||||||
|
url: 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}{r}.png?access_token={accessToken}',
|
||||||
|
options: {
|
||||||
|
attribution:
|
||||||
|
'<a href="https://www.mapbox.com/about/maps/" target="_blank">© Mapbox</a> ' +
|
||||||
|
'{attribution.OpenStreetMap} ' +
|
||||||
|
'<a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a>',
|
||||||
|
subdomains: 'abcd',
|
||||||
|
id: 'mapbox.streets',
|
||||||
|
accessToken: '<insert your access token here>',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Stamen: {
|
||||||
|
url: '//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}{r}.{ext}',
|
||||||
|
options: {
|
||||||
|
attribution:
|
||||||
|
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' +
|
||||||
|
'<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — ' +
|
||||||
|
'Map data {attribution.OpenStreetMap}',
|
||||||
|
subdomains: 'abcd',
|
||||||
|
minZoom: 0,
|
||||||
|
maxZoom: 20,
|
||||||
|
variant: 'toner',
|
||||||
|
ext: 'png'
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
Toner: 'toner',
|
||||||
|
TonerBackground: 'toner-background',
|
||||||
|
TonerHybrid: 'toner-hybrid',
|
||||||
|
TonerLines: 'toner-lines',
|
||||||
|
TonerLabels: 'toner-labels',
|
||||||
|
TonerLite: 'toner-lite',
|
||||||
|
Watercolor: {
|
||||||
|
url: '//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
|
||||||
|
options: {
|
||||||
|
variant: 'watercolor',
|
||||||
|
ext: 'jpg',
|
||||||
|
minZoom: 1,
|
||||||
|
maxZoom: 16
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Terrain: {
|
||||||
|
options: {
|
||||||
|
variant: 'terrain',
|
||||||
|
minZoom: 0,
|
||||||
|
maxZoom: 18
|
||||||
|
}
|
||||||
|
},
|
||||||
|
TerrainBackground: {
|
||||||
|
options: {
|
||||||
|
variant: 'terrain-background',
|
||||||
|
minZoom: 0,
|
||||||
|
maxZoom: 18
|
||||||
|
}
|
||||||
|
},
|
||||||
|
TerrainLabels: {
|
||||||
|
options: {
|
||||||
|
variant: 'terrain-labels',
|
||||||
|
minZoom: 0,
|
||||||
|
maxZoom: 18
|
||||||
|
}
|
||||||
|
},
|
||||||
|
TopOSMRelief: {
|
||||||
|
url: '//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
|
||||||
|
options: {
|
||||||
|
variant: 'toposm-color-relief',
|
||||||
|
ext: 'jpg',
|
||||||
|
bounds: [[22, -132], [51, -56]]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
TopOSMFeatures: {
|
||||||
|
options: {
|
||||||
|
variant: 'toposm-features',
|
||||||
|
bounds: [[22, -132], [51, -56]],
|
||||||
|
opacity: 0.9
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
TomTom: {
|
||||||
|
url: 'https://{s}.api.tomtom.com/map/1/tile/{variant}/{style}/{z}/{x}/{y}.{ext}?key={apikey}',
|
||||||
|
options: {
|
||||||
|
variant: 'basic',
|
||||||
|
maxZoom: 22,
|
||||||
|
attribution:
|
||||||
|
'<a href="https://tomtom.com" target="_blank">© 1992 - ' + new Date().getFullYear() + ' TomTom.</a> ',
|
||||||
|
subdomains: 'abcd',
|
||||||
|
style: 'main',
|
||||||
|
ext: 'png',
|
||||||
|
apikey: '<insert your API key here>',
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
Basic: 'basic',
|
||||||
|
Hybrid: 'hybrid',
|
||||||
|
Labels: 'labels'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Esri: {
|
||||||
|
url: '//server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}',
|
||||||
|
options: {
|
||||||
|
variant: 'World_Street_Map',
|
||||||
|
attribution: 'Tiles © Esri'
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
WorldStreetMap: {
|
||||||
|
options: {
|
||||||
|
attribution:
|
||||||
|
'{attribution.Esri} — ' +
|
||||||
|
'Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
DeLorme: {
|
||||||
|
options: {
|
||||||
|
variant: 'Specialty/DeLorme_World_Base_Map',
|
||||||
|
minZoom: 1,
|
||||||
|
maxZoom: 11,
|
||||||
|
attribution: '{attribution.Esri} — Copyright: ©2012 DeLorme'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
WorldTopoMap: {
|
||||||
|
options: {
|
||||||
|
variant: 'World_Topo_Map',
|
||||||
|
attribution:
|
||||||
|
'{attribution.Esri} — ' +
|
||||||
|
'Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
WorldImagery: {
|
||||||
|
options: {
|
||||||
|
variant: 'World_Imagery',
|
||||||
|
attribution:
|
||||||
|
'{attribution.Esri} — ' +
|
||||||
|
'Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
WorldTerrain: {
|
||||||
|
options: {
|
||||||
|
variant: 'World_Terrain_Base',
|
||||||
|
maxZoom: 13,
|
||||||
|
attribution:
|
||||||
|
'{attribution.Esri} — ' +
|
||||||
|
'Source: USGS, Esri, TANA, DeLorme, and NPS'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
WorldShadedRelief: {
|
||||||
|
options: {
|
||||||
|
variant: 'World_Shaded_Relief',
|
||||||
|
maxZoom: 13,
|
||||||
|
attribution: '{attribution.Esri} — Source: Esri'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
WorldPhysical: {
|
||||||
|
options: {
|
||||||
|
variant: 'World_Physical_Map',
|
||||||
|
maxZoom: 8,
|
||||||
|
attribution: '{attribution.Esri} — Source: US National Park Service'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
OceanBasemap: {
|
||||||
|
options: {
|
||||||
|
variant: 'Ocean_Basemap',
|
||||||
|
maxZoom: 13,
|
||||||
|
attribution: '{attribution.Esri} — Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
NatGeoWorldMap: {
|
||||||
|
options: {
|
||||||
|
variant: 'NatGeo_World_Map',
|
||||||
|
maxZoom: 16,
|
||||||
|
attribution: '{attribution.Esri} — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
WorldGrayCanvas: {
|
||||||
|
options: {
|
||||||
|
variant: 'Canvas/World_Light_Gray_Base',
|
||||||
|
maxZoom: 16,
|
||||||
|
attribution: '{attribution.Esri} — Esri, DeLorme, NAVTEQ'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
OpenWeatherMap: {
|
||||||
|
url: 'http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png?appid={apiKey}',
|
||||||
|
options: {
|
||||||
|
maxZoom: 19,
|
||||||
|
attribution: 'Map data © <a href="http://openweathermap.org">OpenWeatherMap</a>',
|
||||||
|
apiKey:'<insert your api key here>',
|
||||||
|
opacity: 0.5
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
Clouds: 'clouds',
|
||||||
|
CloudsClassic: 'clouds_cls',
|
||||||
|
Precipitation: 'precipitation',
|
||||||
|
PrecipitationClassic: 'precipitation_cls',
|
||||||
|
Rain: 'rain',
|
||||||
|
RainClassic: 'rain_cls',
|
||||||
|
Pressure: 'pressure',
|
||||||
|
PressureContour: 'pressure_cntr',
|
||||||
|
Wind: 'wind',
|
||||||
|
Temperature: 'temp',
|
||||||
|
Snow: 'snow'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HERE: {
|
||||||
|
/*
|
||||||
|
* HERE maps, formerly Nokia maps.
|
||||||
|
* These basemaps are free, but you need an API key. Please sign up at
|
||||||
|
* https://developer.here.com/plans
|
||||||
|
*/
|
||||||
|
url:
|
||||||
|
'https://{s}.{base}.maps.api.here.com/maptile/2.1/' +
|
||||||
|
'{type}/{mapID}/{variant}/{z}/{x}/{y}/{size}/{format}?' +
|
||||||
|
'app_id={app_id}&app_code={app_code}&lg={language}',
|
||||||
|
options: {
|
||||||
|
attribution:
|
||||||
|
'Map © 1987-' + new Date().getFullYear() + ' <a href="http://developer.here.com">HERE</a>',
|
||||||
|
subdomains: '1234',
|
||||||
|
mapID: 'newest',
|
||||||
|
'app_id': '<insert your app_id here>',
|
||||||
|
'app_code': '<insert your app_code here>',
|
||||||
|
base: 'base',
|
||||||
|
variant: 'normal.day',
|
||||||
|
maxZoom: 20,
|
||||||
|
type: 'maptile',
|
||||||
|
language: 'eng',
|
||||||
|
format: 'png8',
|
||||||
|
size: '256'
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
normalDay: 'normal.day',
|
||||||
|
normalDayCustom: 'normal.day.custom',
|
||||||
|
normalDayGrey: 'normal.day.grey',
|
||||||
|
normalDayMobile: 'normal.day.mobile',
|
||||||
|
normalDayGreyMobile: 'normal.day.grey.mobile',
|
||||||
|
normalDayTransit: 'normal.day.transit',
|
||||||
|
normalDayTransitMobile: 'normal.day.transit.mobile',
|
||||||
|
normalDayTraffic: {
|
||||||
|
options: {
|
||||||
|
variant: 'normal.traffic.day',
|
||||||
|
base: 'traffic',
|
||||||
|
type: 'traffictile'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
normalNight: 'normal.night',
|
||||||
|
normalNightMobile: 'normal.night.mobile',
|
||||||
|
normalNightGrey: 'normal.night.grey',
|
||||||
|
normalNightGreyMobile: 'normal.night.grey.mobile',
|
||||||
|
normalNightTransit: 'normal.night.transit',
|
||||||
|
normalNightTransitMobile: 'normal.night.transit.mobile',
|
||||||
|
reducedDay: 'reduced.day',
|
||||||
|
reducedNight: 'reduced.night',
|
||||||
|
basicMap: {
|
||||||
|
options: {
|
||||||
|
type: 'basetile'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mapLabels: {
|
||||||
|
options: {
|
||||||
|
type: 'labeltile',
|
||||||
|
format: 'png'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
trafficFlow: {
|
||||||
|
options: {
|
||||||
|
base: 'traffic',
|
||||||
|
type: 'flowtile'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
carnavDayGrey: 'carnav.day.grey',
|
||||||
|
hybridDay: {
|
||||||
|
options: {
|
||||||
|
base: 'aerial',
|
||||||
|
variant: 'hybrid.day'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hybridDayMobile: {
|
||||||
|
options: {
|
||||||
|
base: 'aerial',
|
||||||
|
variant: 'hybrid.day.mobile'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hybridDayTransit: {
|
||||||
|
options: {
|
||||||
|
base: 'aerial',
|
||||||
|
variant: 'hybrid.day.transit'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hybridDayGrey: {
|
||||||
|
options: {
|
||||||
|
base: 'aerial',
|
||||||
|
variant: 'hybrid.grey.day'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hybridDayTraffic: {
|
||||||
|
options: {
|
||||||
|
variant: 'hybrid.traffic.day',
|
||||||
|
base: 'traffic',
|
||||||
|
type: 'traffictile'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pedestrianDay: 'pedestrian.day',
|
||||||
|
pedestrianNight: 'pedestrian.night',
|
||||||
|
satelliteDay: {
|
||||||
|
options: {
|
||||||
|
base: 'aerial',
|
||||||
|
variant: 'satellite.day'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
terrainDay: {
|
||||||
|
options: {
|
||||||
|
base: 'aerial',
|
||||||
|
variant: 'terrain.day'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
terrainDayMobile: {
|
||||||
|
options: {
|
||||||
|
base: 'aerial',
|
||||||
|
variant: 'terrain.day.mobile'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
FreeMapSK: {
|
||||||
|
url: 'http://t{s}.freemap.sk/T/{z}/{x}/{y}.jpeg',
|
||||||
|
options: {
|
||||||
|
minZoom: 8,
|
||||||
|
maxZoom: 16,
|
||||||
|
subdomains: '1234',
|
||||||
|
bounds: [[47.204642, 15.996093], [49.830896, 22.576904]],
|
||||||
|
attribution:
|
||||||
|
'{attribution.OpenStreetMap}, vizualization CC-By-SA 2.0 <a href="http://freemap.sk">Freemap.sk</a>'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
MtbMap: {
|
||||||
|
url: 'http://tile.mtbmap.cz/mtbmap_tiles/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
attribution:
|
||||||
|
'{attribution.OpenStreetMap} & USGS'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
CartoDB: {
|
||||||
|
url: 'https://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}{r}.png',
|
||||||
|
options: {
|
||||||
|
attribution: '{attribution.OpenStreetMap} © <a href="https://carto.com/attributions">CARTO</a>',
|
||||||
|
subdomains: 'abcd',
|
||||||
|
maxZoom: 19,
|
||||||
|
variant: 'light_all'
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
Positron: 'light_all',
|
||||||
|
PositronNoLabels: 'light_nolabels',
|
||||||
|
PositronOnlyLabels: 'light_only_labels',
|
||||||
|
DarkMatter: 'dark_all',
|
||||||
|
DarkMatterNoLabels: 'dark_nolabels',
|
||||||
|
DarkMatterOnlyLabels: 'dark_only_labels',
|
||||||
|
Voyager: 'rastertiles/voyager',
|
||||||
|
VoyagerNoLabels: 'rastertiles/voyager_nolabels',
|
||||||
|
VoyagerOnlyLabels: 'rastertiles/voyager_only_labels',
|
||||||
|
VoyagerLabelsUnder: 'rastertiles/voyager_labels_under'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
HikeBike: {
|
||||||
|
url: 'https://tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
maxZoom: 19,
|
||||||
|
attribution: '{attribution.OpenStreetMap}',
|
||||||
|
variant: 'hikebike'
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
HikeBike: {},
|
||||||
|
HillShading: {
|
||||||
|
options: {
|
||||||
|
maxZoom: 15,
|
||||||
|
variant: 'hillshading'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
BasemapAT: {
|
||||||
|
url: '//maps{s}.wien.gv.at/basemap/{variant}/normal/google3857/{z}/{y}/{x}.{format}',
|
||||||
|
options: {
|
||||||
|
maxZoom: 19,
|
||||||
|
attribution: 'Datenquelle: <a href="https://www.basemap.at">basemap.at</a>',
|
||||||
|
subdomains: ['', '1', '2', '3', '4'],
|
||||||
|
format: 'png',
|
||||||
|
bounds: [[46.358770, 8.782379], [49.037872, 17.189532]],
|
||||||
|
variant: 'geolandbasemap'
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
basemap: {
|
||||||
|
options: {
|
||||||
|
maxZoom: 20, // currently only in Vienna
|
||||||
|
variant: 'geolandbasemap'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
grau: 'bmapgrau',
|
||||||
|
overlay: 'bmapoverlay',
|
||||||
|
highdpi: {
|
||||||
|
options: {
|
||||||
|
variant: 'bmaphidpi',
|
||||||
|
format: 'jpeg'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
orthofoto: {
|
||||||
|
options: {
|
||||||
|
maxZoom: 20, // currently only in Vienna
|
||||||
|
variant: 'bmaporthofoto30cm',
|
||||||
|
format: 'jpeg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
nlmaps: {
|
||||||
|
url: '//geodata.nationaalgeoregister.nl/tiles/service/wmts/{variant}/EPSG:3857/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
minZoom: 6,
|
||||||
|
maxZoom: 19,
|
||||||
|
bounds: [[50.5, 3.25], [54, 7.6]],
|
||||||
|
attribution: 'Kaartgegevens © <a href="kadaster.nl">Kadaster</a>'
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
'standaard': 'brtachtergrondkaart',
|
||||||
|
'pastel': 'brtachtergrondkaartpastel',
|
||||||
|
'grijs': 'brtachtergrondkaartgrijs',
|
||||||
|
'luchtfoto': {
|
||||||
|
'url': '//geodata.nationaalgeoregister.nl/luchtfoto/rgb/wmts/1.0.0/2016_ortho25/EPSG:3857/{z}/{x}/{y}.png',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
NASAGIBS: {
|
||||||
|
url: 'https://map1.vis.earthdata.nasa.gov/wmts-webmerc/{variant}/default/{time}/{tilematrixset}{maxZoom}/{z}/{y}/{x}.{format}',
|
||||||
|
options: {
|
||||||
|
attribution:
|
||||||
|
'Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System ' +
|
||||||
|
'(<a href="https://earthdata.nasa.gov">ESDIS</a>) with funding provided by NASA/HQ.',
|
||||||
|
bounds: [[-85.0511287776, -179.999999975], [85.0511287776, 179.999999975]],
|
||||||
|
minZoom: 1,
|
||||||
|
maxZoom: 9,
|
||||||
|
format: 'jpg',
|
||||||
|
time: '',
|
||||||
|
tilematrixset: 'GoogleMapsCompatible_Level'
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
ModisTerraTrueColorCR: 'MODIS_Terra_CorrectedReflectance_TrueColor',
|
||||||
|
ModisTerraBands367CR: 'MODIS_Terra_CorrectedReflectance_Bands367',
|
||||||
|
ViirsEarthAtNight2012: {
|
||||||
|
options: {
|
||||||
|
variant: 'VIIRS_CityLights_2012',
|
||||||
|
maxZoom: 8
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ModisTerraLSTDay: {
|
||||||
|
options: {
|
||||||
|
variant: 'MODIS_Terra_Land_Surface_Temp_Day',
|
||||||
|
format: 'png',
|
||||||
|
maxZoom: 7,
|
||||||
|
opacity: 0.75
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ModisTerraSnowCover: {
|
||||||
|
options: {
|
||||||
|
variant: 'MODIS_Terra_Snow_Cover',
|
||||||
|
format: 'png',
|
||||||
|
maxZoom: 8,
|
||||||
|
opacity: 0.75
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ModisTerraAOD: {
|
||||||
|
options: {
|
||||||
|
variant: 'MODIS_Terra_Aerosol',
|
||||||
|
format: 'png',
|
||||||
|
maxZoom: 6,
|
||||||
|
opacity: 0.75
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ModisTerraChlorophyll: {
|
||||||
|
options: {
|
||||||
|
variant: 'MODIS_Terra_Chlorophyll_A',
|
||||||
|
format: 'png',
|
||||||
|
maxZoom: 7,
|
||||||
|
opacity: 0.75
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
NLS: {
|
||||||
|
// NLS maps are copyright National library of Scotland.
|
||||||
|
// http://maps.nls.uk/projects/api/index.html
|
||||||
|
// Please contact NLS for anything other than non-commercial low volume usage
|
||||||
|
//
|
||||||
|
// Map sources: Ordnance Survey 1:1m to 1:63K, 1920s-1940s
|
||||||
|
// z0-9 - 1:1m
|
||||||
|
// z10-11 - quarter inch (1:253440)
|
||||||
|
// z12-18 - one inch (1:63360)
|
||||||
|
url: '//nls-{s}.tileserver.com/nls/{z}/{x}/{y}.jpg',
|
||||||
|
options: {
|
||||||
|
attribution: '<a href="http://geo.nls.uk/maps/">National Library of Scotland Historic Maps</a>',
|
||||||
|
bounds: [[49.6, -12], [61.7, 3]],
|
||||||
|
minZoom: 1,
|
||||||
|
maxZoom: 18,
|
||||||
|
subdomains: '0123',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
JusticeMap: {
|
||||||
|
// Justice Map (http://www.justicemap.org/)
|
||||||
|
// Visualize race and income data for your community, county and country.
|
||||||
|
// Includes tools for data journalists, bloggers and community activists.
|
||||||
|
url: 'http://www.justicemap.org/tile/{size}/{variant}/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
attribution: '<a href="http://www.justicemap.org/terms.php">Justice Map</a>',
|
||||||
|
// one of 'county', 'tract', 'block'
|
||||||
|
size: 'county',
|
||||||
|
// Bounds for USA, including Alaska and Hawaii
|
||||||
|
bounds: [[14, -180], [72, -56]]
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
income: 'income',
|
||||||
|
americanIndian: 'indian',
|
||||||
|
asian: 'asian',
|
||||||
|
black: 'black',
|
||||||
|
hispanic: 'hispanic',
|
||||||
|
multi: 'multi',
|
||||||
|
nonWhite: 'nonwhite',
|
||||||
|
white: 'white',
|
||||||
|
plurality: 'plural'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Wikimedia: {
|
||||||
|
url: 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png',
|
||||||
|
options: {
|
||||||
|
attribution: '<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use">Wikimedia</a>',
|
||||||
|
minZoom: 1,
|
||||||
|
maxZoom: 19
|
||||||
|
}
|
||||||
|
},
|
||||||
|
GeoportailFrance: {
|
||||||
|
url: 'https://wxs.ign.fr/{apikey}/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE={style}&TILEMATRIXSET=PM&FORMAT={format}&LAYER={variant}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}',
|
||||||
|
options: {
|
||||||
|
attribution: '<a target="_blank" href="https://www.geoportail.gouv.fr/">Geoportail France</a>',
|
||||||
|
bounds: [[-75, -180], [81, 180]],
|
||||||
|
minZoom: 2,
|
||||||
|
maxZoom: 18,
|
||||||
|
// Get your own geoportail apikey here : http://professionnels.ign.fr/ign/contrats/
|
||||||
|
// NB : 'choisirgeoportail' is a demonstration key that comes with no guarantee
|
||||||
|
apikey: 'choisirgeoportail',
|
||||||
|
format: 'image/jpeg',
|
||||||
|
style : 'normal',
|
||||||
|
variant: 'GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD'
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
parcels: {
|
||||||
|
options : {
|
||||||
|
variant: 'CADASTRALPARCELS.PARCELS',
|
||||||
|
maxZoom: 20,
|
||||||
|
style : 'bdparcellaire',
|
||||||
|
format: 'image/png'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ignMaps: 'GEOGRAPHICALGRIDSYSTEMS.MAPS',
|
||||||
|
maps: 'GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD',
|
||||||
|
orthos: {
|
||||||
|
options: {
|
||||||
|
maxZoom: 19,
|
||||||
|
variant: 'ORTHOIMAGERY.ORTHOPHOTOS'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
OneMapSG: {
|
||||||
|
url: '//maps-{s}.onemap.sg/v3/{variant}/{z}/{x}/{y}.png',
|
||||||
|
options: {
|
||||||
|
variant: 'Default',
|
||||||
|
minZoom: 11,
|
||||||
|
maxZoom: 18,
|
||||||
|
bounds: [[1.56073, 104.11475], [1.16, 103.502]],
|
||||||
|
attribution: '<img src="https://docs.onemap.sg/maps/images/oneMap64-01.png" style="height:20px;width:20px;"/> New OneMap | Map data © contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>'
|
||||||
|
},
|
||||||
|
variants: {
|
||||||
|
Default: 'Default',
|
||||||
|
Night: 'Night',
|
||||||
|
Original: 'Original',
|
||||||
|
Grey: 'Grey',
|
||||||
|
LandLot: 'LandLot'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
L.tileLayer.provider = function (provider, options) {
|
||||||
|
return new L.TileLayer.Provider(provider, options);
|
||||||
|
};
|
||||||
|
|
||||||
|
return L;
|
||||||
|
}));
|
|
@ -0,0 +1,3 @@
|
||||||
|
LeafletWidget.methods.addProviderTiles = function(provider, layerId, group, options) {
|
||||||
|
this.layerManager.addLayer(L.tileLayer.provider(provider, options), "tile", layerId, group);
|
||||||
|
};
|
36
_freeze/site_libs/leafletfix-1.0.0/leafletfix.css
Normal file
36
_freeze/site_libs/leafletfix-1.0.0/leafletfix.css
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
/* Work around CSS properties introduced on img by bootstrap */
|
||||||
|
img.leaflet-tile {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.info {
|
||||||
|
padding: 6px 8px;
|
||||||
|
font: 14px/16px Arial, Helvetica, sans-serif;
|
||||||
|
background: white;
|
||||||
|
background: rgba(255,255,255,0.8);
|
||||||
|
box-shadow: 0 0 15px rgba(0,0,0,0.2);
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
.legend {
|
||||||
|
line-height: 18px;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
.legend svg text {
|
||||||
|
fill: #555;
|
||||||
|
}
|
||||||
|
.legend svg line {
|
||||||
|
stroke: #555;
|
||||||
|
}
|
||||||
|
.legend i {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
margin-right: 4px;
|
||||||
|
opacity: 0.7;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
/*For IE 7*/
|
||||||
|
zoom: 1;
|
||||||
|
*display: inline;
|
||||||
|
}
|
1
_freeze/site_libs/proj4-2.6.2/proj4.min.js
vendored
Normal file
1
_freeze/site_libs/proj4-2.6.2/proj4.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
_freeze/site_libs/quarto-listing/list.min.js
vendored
Normal file
2
_freeze/site_libs/quarto-listing/list.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
243
_freeze/site_libs/quarto-listing/quarto-listing.js
Normal file
243
_freeze/site_libs/quarto-listing/quarto-listing.js
Normal file
|
@ -0,0 +1,243 @@
|
||||||
|
const kProgressiveAttr = "data-src";
|
||||||
|
let categoriesLoaded = false;
|
||||||
|
|
||||||
|
window.quartoListingCategory = (category) => {
|
||||||
|
if (categoriesLoaded) {
|
||||||
|
activateCategory(category);
|
||||||
|
setCategoryHash(category);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window["quarto-listing-loaded"] = () => {
|
||||||
|
// Process any existing hash
|
||||||
|
const hash = getHash();
|
||||||
|
|
||||||
|
if (hash) {
|
||||||
|
// If there is a category, switch to that
|
||||||
|
if (hash.category) {
|
||||||
|
activateCategory(hash.category);
|
||||||
|
}
|
||||||
|
// Paginate a specific listing
|
||||||
|
const listingIds = Object.keys(window["quarto-listings"]);
|
||||||
|
for (const listingId of listingIds) {
|
||||||
|
const page = hash[getListingPageKey(listingId)];
|
||||||
|
if (page) {
|
||||||
|
showPage(listingId, page);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const listingIds = Object.keys(window["quarto-listings"]);
|
||||||
|
for (const listingId of listingIds) {
|
||||||
|
// The actual list
|
||||||
|
const list = window["quarto-listings"][listingId];
|
||||||
|
|
||||||
|
// Update the handlers for pagination events
|
||||||
|
refreshPaginationHandlers(listingId);
|
||||||
|
|
||||||
|
// Render any visible items that need it
|
||||||
|
renderVisibleProgressiveImages(list);
|
||||||
|
|
||||||
|
// Whenever the list is updated, we also need to
|
||||||
|
// attach handlers to the new pagination elements
|
||||||
|
// and refresh any newly visible items.
|
||||||
|
list.on("updated", function () {
|
||||||
|
renderVisibleProgressiveImages(list);
|
||||||
|
setTimeout(() => refreshPaginationHandlers(listingId));
|
||||||
|
|
||||||
|
// Show or hide the no matching message
|
||||||
|
toggleNoMatchingMessage(list);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.document.addEventListener("DOMContentLoaded", function (_event) {
|
||||||
|
// Attach click handlers to categories
|
||||||
|
const categoryEls = window.document.querySelectorAll(
|
||||||
|
".quarto-listing-category .category"
|
||||||
|
);
|
||||||
|
|
||||||
|
for (const categoryEl of categoryEls) {
|
||||||
|
const category = categoryEl.getAttribute("data-category");
|
||||||
|
categoryEl.onclick = () => {
|
||||||
|
activateCategory(category);
|
||||||
|
setCategoryHash(category);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Attach a click handler to the category title
|
||||||
|
// (there should be only one, but since it is a class name, handle N)
|
||||||
|
const categoryTitleEls = window.document.querySelectorAll(
|
||||||
|
".quarto-listing-category-title"
|
||||||
|
);
|
||||||
|
for (const categoryTitleEl of categoryTitleEls) {
|
||||||
|
categoryTitleEl.onclick = () => {
|
||||||
|
activateCategory("");
|
||||||
|
setCategoryHash("");
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
categoriesLoaded = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
function toggleNoMatchingMessage(list) {
|
||||||
|
const selector = `#${list.listContainer.id} .listing-no-matching`;
|
||||||
|
const noMatchingEl = window.document.querySelector(selector);
|
||||||
|
if (noMatchingEl) {
|
||||||
|
if (list.visibleItems.length === 0) {
|
||||||
|
noMatchingEl.classList.remove("d-none");
|
||||||
|
} else {
|
||||||
|
if (!noMatchingEl.classList.contains("d-none")) {
|
||||||
|
noMatchingEl.classList.add("d-none");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setCategoryHash(category) {
|
||||||
|
setHash({ category });
|
||||||
|
}
|
||||||
|
|
||||||
|
function setPageHash(listingId, page) {
|
||||||
|
const currentHash = getHash() || {};
|
||||||
|
currentHash[getListingPageKey(listingId)] = page;
|
||||||
|
setHash(currentHash);
|
||||||
|
}
|
||||||
|
|
||||||
|
function getListingPageKey(listingId) {
|
||||||
|
return `${listingId}-page`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function refreshPaginationHandlers(listingId) {
|
||||||
|
const listingEl = window.document.getElementById(listingId);
|
||||||
|
const paginationEls = listingEl.querySelectorAll(
|
||||||
|
".pagination li.page-item:not(.disabled) .page.page-link"
|
||||||
|
);
|
||||||
|
for (const paginationEl of paginationEls) {
|
||||||
|
paginationEl.onclick = (sender) => {
|
||||||
|
setPageHash(listingId, sender.target.getAttribute("data-i"));
|
||||||
|
showPage(listingId, sender.target.getAttribute("data-i"));
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderVisibleProgressiveImages(list) {
|
||||||
|
// Run through the visible items and render any progressive images
|
||||||
|
for (const item of list.visibleItems) {
|
||||||
|
const itemEl = item.elm;
|
||||||
|
if (itemEl) {
|
||||||
|
const progressiveImgs = itemEl.querySelectorAll(
|
||||||
|
`img[${kProgressiveAttr}]`
|
||||||
|
);
|
||||||
|
for (const progressiveImg of progressiveImgs) {
|
||||||
|
const srcValue = progressiveImg.getAttribute(kProgressiveAttr);
|
||||||
|
if (srcValue) {
|
||||||
|
progressiveImg.setAttribute("src", srcValue);
|
||||||
|
}
|
||||||
|
progressiveImg.removeAttribute(kProgressiveAttr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getHash() {
|
||||||
|
// Hashes are of the form
|
||||||
|
// #name:value|name1:value1|name2:value2
|
||||||
|
const currentUrl = new URL(window.location);
|
||||||
|
const hashRaw = currentUrl.hash ? currentUrl.hash.slice(1) : undefined;
|
||||||
|
return parseHash(hashRaw);
|
||||||
|
}
|
||||||
|
|
||||||
|
const kAnd = "&";
|
||||||
|
const kEquals = "=";
|
||||||
|
|
||||||
|
function parseHash(hash) {
|
||||||
|
if (!hash) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
const hasValuesStrs = hash.split(kAnd);
|
||||||
|
const hashValues = hasValuesStrs
|
||||||
|
.map((hashValueStr) => {
|
||||||
|
const vals = hashValueStr.split(kEquals);
|
||||||
|
if (vals.length === 2) {
|
||||||
|
return { name: vals[0], value: vals[1] };
|
||||||
|
} else {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.filter((value) => {
|
||||||
|
return value !== undefined;
|
||||||
|
});
|
||||||
|
|
||||||
|
const hashObj = {};
|
||||||
|
hashValues.forEach((hashValue) => {
|
||||||
|
hashObj[hashValue.name] = decodeURIComponent(hashValue.value);
|
||||||
|
});
|
||||||
|
return hashObj;
|
||||||
|
}
|
||||||
|
|
||||||
|
function makeHash(obj) {
|
||||||
|
return Object.keys(obj)
|
||||||
|
.map((key) => {
|
||||||
|
return `${key}${kEquals}${obj[key]}`;
|
||||||
|
})
|
||||||
|
.join(kAnd);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setHash(obj) {
|
||||||
|
const hash = makeHash(obj);
|
||||||
|
window.history.pushState(null, null, `#${hash}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function showPage(listingId, page) {
|
||||||
|
const list = window["quarto-listings"][listingId];
|
||||||
|
if (list) {
|
||||||
|
list.show((page - 1) * list.page + 1, list.page);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function activateCategory(category) {
|
||||||
|
// Deactivate existing categories
|
||||||
|
const activeEls = window.document.querySelectorAll(
|
||||||
|
".quarto-listing-category .category.active"
|
||||||
|
);
|
||||||
|
for (const activeEl of activeEls) {
|
||||||
|
activeEl.classList.remove("active");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Activate this category
|
||||||
|
const categoryEl = window.document.querySelector(
|
||||||
|
`.quarto-listing-category .category[data-category='${category}'`
|
||||||
|
);
|
||||||
|
if (categoryEl) {
|
||||||
|
categoryEl.classList.add("active");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Filter the listings to this category
|
||||||
|
filterListingCategory(category);
|
||||||
|
}
|
||||||
|
|
||||||
|
function filterListingCategory(category) {
|
||||||
|
const listingIds = Object.keys(window["quarto-listings"]);
|
||||||
|
for (const listingId of listingIds) {
|
||||||
|
const list = window["quarto-listings"][listingId];
|
||||||
|
if (list) {
|
||||||
|
if (category === "") {
|
||||||
|
// resets the filter
|
||||||
|
list.filter();
|
||||||
|
} else {
|
||||||
|
// filter to this category
|
||||||
|
list.filter(function (item) {
|
||||||
|
const itemValues = item.values();
|
||||||
|
if (itemValues.categories !== null) {
|
||||||
|
const categories = itemValues.categories.split(",");
|
||||||
|
return categories.includes(category);
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
BIN
_freeze/site_libs/rstudio_leaflet-1.3.1/images/1px.png
Normal file
BIN
_freeze/site_libs/rstudio_leaflet-1.3.1/images/1px.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 68 B |
41
_freeze/site_libs/rstudio_leaflet-1.3.1/rstudio_leaflet.css
Normal file
41
_freeze/site_libs/rstudio_leaflet-1.3.1/rstudio_leaflet.css
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
.leaflet-tooltip.leaflet-tooltip-text-only,
|
||||||
|
.leaflet-tooltip.leaflet-tooltip-text-only:before,
|
||||||
|
.leaflet-tooltip.leaflet-tooltip-text-only:after {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leaflet-tooltip.leaflet-tooltip-text-only.leaflet-tooltip-left {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leaflet-tooltip.leaflet-tooltip-text-only.leaflet-tooltip-right {
|
||||||
|
margin-left: -5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leaflet-tooltip:after {
|
||||||
|
border-right: 6px solid transparent;
|
||||||
|
/* right: -16px; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.leaflet-popup-pane .leaflet-popup-tip-container {
|
||||||
|
/* when the tooltip container is clicked, it is closed */
|
||||||
|
pointer-events: all;
|
||||||
|
/* tooltips should display the "hand" icon, just like .leaflet-interactive*/
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* have the widget be displayed in the right 'layer' */
|
||||||
|
.leaflet-map-pane {
|
||||||
|
z-index: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add missing rule from leaflet for img.
|
||||||
|
This complete existing leaflet.css.
|
||||||
|
Fix for https://github.com/rstudio/rmarkdown/issues/1949 */
|
||||||
|
.leaflet-container .leaflet-right-pane img,
|
||||||
|
.leaflet-container .leaflet-left-pane img {
|
||||||
|
max-width: none !important;
|
||||||
|
max-height: none !important;
|
||||||
|
}
|
|
@ -2,6 +2,9 @@ project:
|
||||||
type: website
|
type: website
|
||||||
output-dir: docs
|
output-dir: docs
|
||||||
|
|
||||||
|
execute:
|
||||||
|
freeze: auto
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- CNAME
|
- CNAME
|
||||||
|
|
||||||
|
|
0
docs/.nojekyll
Normal file
0
docs/.nojekyll
Normal file
|
@ -179,7 +179,7 @@ ul.task-list li input[type="checkbox"] {
|
||||||
|
|
||||||
<div class="quarto-listing quarto-listing-container-grid" id="listing-listing">
|
<div class="quarto-listing quarto-listing-container-grid" id="listing-listing">
|
||||||
<div class="list grid quarto-listing-cols-3">
|
<div class="list grid quarto-listing-cols-3">
|
||||||
<div class="g-col-1" data-index="0" data-categories="Canada,Rejse,Børn,R" data-listing-date-sort="1687384800000" data-listing-file-modified-sort="1687520913219" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="3">
|
<div class="g-col-1" data-index="0" data-categories="Canada,Rejse,Børn,R" data-listing-date-sort="1687384800000" data-listing-file-modified-sort="1687761536078" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="3">
|
||||||
<a href="./blog/canada_camper.html" class="quarto-grid-link">
|
<a href="./blog/canada_camper.html" class="quarto-grid-link">
|
||||||
<div class="quarto-grid-item card h-100 card-left">
|
<div class="quarto-grid-item card h-100 card-left">
|
||||||
<p class="card-img-top">
|
<p class="card-img-top">
|
||||||
|
@ -570,7 +570,7 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
||||||
var filterRegex = new RegExp('/' + window.location.host + '/');
|
var filterRegex = new RegExp("https:\/\/familien\.gdamsbo\.dk");
|
||||||
var isInternal = (href) => {
|
var isInternal = (href) => {
|
||||||
return filterRegex.test(href) || localhostRegex.test(href);
|
return filterRegex.test(href) || localhostRegex.test(href);
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -181,7 +181,7 @@ ul.task-list li input[type="checkbox"] {
|
||||||
|
|
||||||
<div class="quarto-listing quarto-listing-container-default" id="listing-listing">
|
<div class="quarto-listing quarto-listing-container-default" id="listing-listing">
|
||||||
<div class="list quarto-listing-default">
|
<div class="list quarto-listing-default">
|
||||||
<div class="quarto-post image-right" data-index="0" data-categories="Bagværk,Brød" data-listing-file-modified-sort="1687434884000" data-listing-reading-time-sort="2">
|
<div class="quarto-post image-right" data-index="0" data-categories="Bagværk,Brød" data-listing-file-modified-sort="1687761536448" data-listing-reading-time-sort="2">
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<p><a href="./food/rugbrød.html"> <div class="listing-item-img-placeholder card-img-top" > </div> </a></p>
|
<p><a href="./food/rugbrød.html"> <div class="listing-item-img-placeholder card-img-top" > </div> </a></p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -212,7 +212,7 @@ Brød
|
||||||
<a href="./food/rugbrød.html"> </a>
|
<a href="./food/rugbrød.html"> </a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="quarto-post image-right" data-index="1" data-categories="Bagværk,Brød" data-listing-file-modified-sort="1687434884000" data-listing-reading-time-sort="1">
|
<div class="quarto-post image-right" data-index="1" data-categories="Bagværk,Brød" data-listing-file-modified-sort="1687761536448" data-listing-reading-time-sort="1">
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<p><a href="./food/surdej.html"> <div class="listing-item-img-placeholder card-img-top" > </div> </a></p>
|
<p><a href="./food/surdej.html"> <div class="listing-item-img-placeholder card-img-top" > </div> </a></p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -243,7 +243,7 @@ Brød
|
||||||
<a href="./food/surdej.html"> </a>
|
<a href="./food/surdej.html"> </a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="quarto-post image-right" data-index="2" data-categories="Kage,Bagværk,Børnene med!,Dansk" data-listing-date-sort="1682632800000" data-listing-file-modified-sort="1687434884000" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1">
|
<div class="quarto-post image-right" data-index="2" data-categories="Kage,Bagværk,Børnene med!,Dansk" data-listing-date-sort="1682632800000" data-listing-file-modified-sort="1687761536319" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1">
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<p><a href="./food/banankage.html"> <div class="listing-item-img-placeholder card-img-top" > </div> </a></p>
|
<p><a href="./food/banankage.html"> <div class="listing-item-img-placeholder card-img-top" > </div> </a></p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -636,7 +636,7 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
||||||
var filterRegex = new RegExp('/' + window.location.host + '/');
|
var filterRegex = new RegExp("https:\/\/familien\.gdamsbo\.dk");
|
||||||
var isInternal = (href) => {
|
var isInternal = (href) => {
|
||||||
return filterRegex.test(href) || localhostRegex.test(href);
|
return filterRegex.test(href) || localhostRegex.test(href);
|
||||||
}
|
}
|
||||||
|
|
|
@ -538,7 +538,7 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
||||||
var filterRegex = new RegExp('/' + window.location.host + '/');
|
var filterRegex = new RegExp("https:\/\/familien\.gdamsbo\.dk");
|
||||||
var isInternal = (href) => {
|
var isInternal = (href) => {
|
||||||
return filterRegex.test(href) || localhostRegex.test(href);
|
return filterRegex.test(href) || localhostRegex.test(href);
|
||||||
}
|
}
|
||||||
|
|
|
@ -489,7 +489,7 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
||||||
var filterRegex = new RegExp('/' + window.location.host + '/');
|
var filterRegex = new RegExp("https:\/\/familien\.gdamsbo\.dk");
|
||||||
var isInternal = (href) => {
|
var isInternal = (href) => {
|
||||||
return filterRegex.test(href) || localhostRegex.test(href);
|
return filterRegex.test(href) || localhostRegex.test(href);
|
||||||
}
|
}
|
||||||
|
|
|
@ -488,7 +488,7 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
||||||
var filterRegex = new RegExp('/' + window.location.host + '/');
|
var filterRegex = new RegExp("https:\/\/familien\.gdamsbo\.dk");
|
||||||
var isInternal = (href) => {
|
var isInternal = (href) => {
|
||||||
return filterRegex.test(href) || localhostRegex.test(href);
|
return filterRegex.test(href) || localhostRegex.test(href);
|
||||||
}
|
}
|
||||||
|
|
|
@ -485,7 +485,7 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
||||||
var filterRegex = new RegExp('/' + window.location.host + '/');
|
var filterRegex = new RegExp("https:\/\/familien\.gdamsbo\.dk");
|
||||||
var isInternal = (href) => {
|
var isInternal = (href) => {
|
||||||
return filterRegex.test(href) || localhostRegex.test(href);
|
return filterRegex.test(href) || localhostRegex.test(href);
|
||||||
}
|
}
|
||||||
|
|
|
@ -495,7 +495,7 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
||||||
var filterRegex = new RegExp('/' + window.location.host + '/');
|
var filterRegex = new RegExp("https:\/\/familien\.gdamsbo\.dk");
|
||||||
var isInternal = (href) => {
|
var isInternal = (href) => {
|
||||||
return filterRegex.test(href) || localhostRegex.test(href);
|
return filterRegex.test(href) || localhostRegex.test(href);
|
||||||
}
|
}
|
||||||
|
|
|
@ -542,7 +542,7 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
||||||
var filterRegex = new RegExp('/' + window.location.host + '/');
|
var filterRegex = new RegExp("https:\/\/familien\.gdamsbo\.dk");
|
||||||
var isInternal = (href) => {
|
var isInternal = (href) => {
|
||||||
return filterRegex.test(href) || localhostRegex.test(href);
|
return filterRegex.test(href) || localhostRegex.test(href);
|
||||||
}
|
}
|
||||||
|
|
|
@ -503,7 +503,7 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
||||||
var filterRegex = new RegExp('/' + window.location.host + '/');
|
var filterRegex = new RegExp("https:\/\/familien\.gdamsbo\.dk");
|
||||||
var isInternal = (href) => {
|
var isInternal = (href) => {
|
||||||
return filterRegex.test(href) || localhostRegex.test(href);
|
return filterRegex.test(href) || localhostRegex.test(href);
|
||||||
}
|
}
|
||||||
|
|
|
@ -471,7 +471,7 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
||||||
var filterRegex = new RegExp('/' + window.location.host + '/');
|
var filterRegex = new RegExp("https:\/\/familien\.gdamsbo\.dk");
|
||||||
var isInternal = (href) => {
|
var isInternal = (href) => {
|
||||||
return filterRegex.test(href) || localhostRegex.test(href);
|
return filterRegex.test(href) || localhostRegex.test(href);
|
||||||
}
|
}
|
||||||
|
|
1
docs/robots.txt
Normal file
1
docs/robots.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Sitemap: https://familien.gdamsbo.dk/sitemap.xml
|
47
docs/sitemap.xml
Normal file
47
docs/sitemap.xml
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
<url>
|
||||||
|
<loc>https://familien.gdamsbo.dk/index.html</loc>
|
||||||
|
<lastmod>2023-06-26T06:40:44.880Z</lastmod>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://familien.gdamsbo.dk/blog/canada_camper.html</loc>
|
||||||
|
<lastmod>2023-06-26T06:40:45.772Z</lastmod>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://familien.gdamsbo.dk/food/formbrød.html</loc>
|
||||||
|
<lastmod>2023-06-26T06:40:46.124Z</lastmod>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://familien.gdamsbo.dk/food/groft hvede-surdejsbrød.html</loc>
|
||||||
|
<lastmod>2023-06-26T06:40:46.533Z</lastmod>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://familien.gdamsbo.dk/food/fladmast hane med nye hvidlog.html</loc>
|
||||||
|
<lastmod>2023-06-26T06:40:46.917Z</lastmod>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://familien.gdamsbo.dk/food/elses vafler.html</loc>
|
||||||
|
<lastmod>2023-06-26T06:40:47.279Z</lastmod>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://familien.gdamsbo.dk/food/rugbrød.html</loc>
|
||||||
|
<lastmod>2023-06-26T06:40:47.687Z</lastmod>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://familien.gdamsbo.dk/food/banankage.html</loc>
|
||||||
|
<lastmod>2023-06-26T06:40:48.067Z</lastmod>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://familien.gdamsbo.dk/food/surdej.html</loc>
|
||||||
|
<lastmod>2023-06-26T06:40:48.453Z</lastmod>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://familien.gdamsbo.dk/food.html</loc>
|
||||||
|
<lastmod>2023-06-26T06:40:49.004Z</lastmod>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://familien.gdamsbo.dk/blog.html</loc>
|
||||||
|
<lastmod>2023-06-26T06:40:49.489Z</lastmod>
|
||||||
|
</url>
|
||||||
|
</urlset>
|
Loading…
Add table
Reference in a new issue