operations_research/web_04/assets/leaflet.js

6 lines
143 KiB
JavaScript
Raw Permalink Normal View History

Folium-Karten: die Blockade war eine falsche Alternative Der einzige Punkt, der in diesem Projekt je als "blockiert" gefuehrt wurde, ist erledigt. Die Begruendung lautete: Die VRP-Instanz sei ein synthetisches 100 x 100-km-Raster ohne Geokoordinaten, eine echte Karte verlange also ENTWEDER eine neue Instanz (und damit zwei Dutzend neue abgedruckte Zahlen) ODER eine willkuerliche Verankerung. Es gibt einen dritten Weg, und er ist exakt. Eine azimutal-aequidistante Projektion um den Schwerpunkt des Rasters bildet die 17 Punkte so auf Laenge und Breite ab, dass die Grosskreisdistanzen mit den Rasterdistanzen uebereinstimmen: festes cos(Breite) Median 0,360 % Maximum 2,003 % cos der eigenen Breite Median 0,351 % Maximum 0,908 % azimutal-aequidistant Median 0,000 % Maximum 0,001 % Ein Meter auf hundert Kilometer. Kein abgedruckter Wert aendert sich, die Gesamtstrecke bleibt bei 619 km, das SVG ist byte-identisch geblieben. Zwei Befunde stuetzten die Entscheidung: "100 x 100 km Raster" steht nur in zwei Codekommentaren, nirgends im Fliesstext; und der didaktische Punkt der Bildunterschrift - die sich kreuzenden Touren, die KEIN Fehler sind - wird auf einer Karte deutlicher. erzeuge_vrp_touren.py schreibt jetzt SVG UND Karte aus einem Lauf. Ein zweites Skript haette erneut geloest, und die Routing-Bibliothek arbeitet heuristisch. pruefe_projektion() bricht ab, wenn die Verzerrung 0,01 % ueberschreitet - die Zahl im Buch wird bei jedem Lauf bewiesen. Neu im Build: die Marke {karte:name}, aufgeloest zu einem <iframe> (Leaflets Stylesheet soll nicht in die Buchseite greifen), im PDF zum Verweissatz - wie bei {plotly:}. --check bewacht jetzt beide Markenarten auf Existenz der Datei; gegengeprueft mit einer absichtlich falschen Marke. Zwei Vorkehrungen, die ohne Messung nicht aufgefallen waeren: * Folium vergibt jedem Element eine uuid4 - jeder Lauf erzeugte eine andere Datei. normalisiere() ersetzt sie durch fortlaufende Nummern; zwei Laeufe liefern jetzt dieselbe Pruefsumme. * Folium bindet ZEHN CDN-Ressourcen ein (jQuery, Bootstrap, Glyphicons, FontAwesome, awesome-markers ...). Gebraucht werden ZWEI. leaflet.js und leaflet.css liegen jetzt in web_04/assets/, die uebrigen acht entfallen. Nachgeprueft: Die Karte benutzt ausschliesslich L.*-Aufrufe. Ohne Netz fehlen nur die Kacheln, Marker und Touren bleiben sichtbar. Gegenrechnung an vier Strecken: Depot -> K1 misst auf der Karte 27,20 km, die Distanzmatrix sagt 27 - die Differenz stammt aus deren int(), nicht aus der Geographie. Veroeffentlicht: 8 Dateien uebertragen, alle dreizehn HTTP-Proben richtig, die Karte auf dem Server unter 200 erreichbar. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-08 20:38:16 +02:00
/* @preserve
* Leaflet 1.9.3, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).leaflet={})}(this,function(t){"use strict";function l(t){for(var e,i,n=1,o=arguments.length;n<o;n++)for(e in i=arguments[n])t[e]=i[e];return t}var R=Object.create||function(t){return N.prototype=t,new N};function N(){}function a(t,e){var i,n=Array.prototype.slice;return t.bind?t.bind.apply(t,n.call(arguments,1)):(i=n.call(arguments,2),function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)})}var D=0;function h(t){return"_leaflet_id"in t||(t._leaflet_id=++D),t._leaflet_id}function j(t,e,i){var n,o,s=function(){n=!1,o&&(r.apply(i,o),o=!1)},r=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(s,e),n=!0)};return r}function H(t,e,i){var n=e[1],e=e[0],o=n-e;return t===n&&i?t:((t-e)%o+o)%o+e}function u(){return!1}function i(t,e){return!1===e?t:(e=Math.pow(10,void 0===e?6:e),Math.round(t*e)/e)}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function W(t){return F(t).split(/\s+/)}function c(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?R(t.options):{}),e)t.options[i]=e[i];return t.options}function U(t,e,i){var n,o=[];for(n in t)o.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(e&&-1!==e.indexOf("?")?"&":"?")+o.join("&")}var V=/\{ *([\w_ -]+) *\}/g;function q(t,i){return t.replace(V,function(t,e){e=i[e];if(void 0===e)throw new Error("No value provided for variable "+t);return e="function"==typeof e?e(i):e})}var d=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function G(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var K="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function Y(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var X=0;function J(t){var e=+new Date,i=Math.max(0,16-(e-X));return X=e+i,window.setTimeout(t,i)}var $=window.requestAnimationFrame||Y("RequestAnimationFrame")||J,Q=window.cancelAnimationFrame||Y("CancelAnimationFrame")||Y("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function x(t,e,i){if(!i||$!==J)return $.call(window,a(t,e));t.call(e)}function r(t){t&&Q.call(window,t)}var tt={__proto__:null,extend:l,create:R,bind:a,get lastId(){return D},stamp:h,throttle:j,wrapNum:H,falseFn:u,formatNum:i,trim:F,splitWords:W,setOptions:c,getParamString:U,template:q,isArray:d,indexOf:G,emptyImageUrl:K,requestFn:$,cancelFn:Q,requestAnimFrame:x,cancelAnimFrame:r};function et(){}et.extend=function(t){function e(){c(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var i,n=e.__super__=this.prototype,o=R(n);for(i in(o.constructor=e).prototype=o,this)Object.prototype.hasOwnProperty.call(this,i)&&"prototype"!==i&&"__super__"!==i&&(e[i]=this[i]);if(t.statics&&l(e,t.statics),t.includes){var s=t.includes;if("undefined"!=typeof L&&L&&L.Mixin){s=d(s)?s:[s];for(var r=0;r<s.length;r++)s[r]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}l.apply(null,[o].concat(t.includes))}return l(o,t),delete o.statics,delete o.includes,o.options&&(o.options=n.options?R(n.options):{},l(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},e},et.include=function(t){var e=this.prototype.options;return l(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},et.mergeOptions=function(t){return l(this.prototype.options,t),this},et.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var e={on:function
//# sourceMappingURL=leaflet.js.map