Merge @ybon changes
This commit is contained in:
parent
c6ce22f319
commit
7c697f7529
6 changed files with 47 additions and 176 deletions
5
umap/static/umap/js/modules/global.js
Normal file
5
umap/static/umap/js/modules/global.js
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
import * as L from '../../vendors/leaflet/leaflet-src.esm.js'
|
||||||
|
|
||||||
|
// Exposes the modules to the window global scope, it's expected by leaflet plugins
|
||||||
|
// in a writeable form.
|
||||||
|
window.L = { ...L }
|
|
@ -1,4 +1,4 @@
|
||||||
import { Util } from './vendors.js'
|
import { Util } from '../../vendors/leaflet/leaflet-src.esm.js'
|
||||||
|
|
||||||
export default class URLs {
|
export default class URLs {
|
||||||
constructor(serverUrls) {
|
constructor(serverUrls) {
|
||||||
|
|
|
@ -1,144 +0,0 @@
|
||||||
import {
|
|
||||||
bind,
|
|
||||||
Bounds,
|
|
||||||
Browser,
|
|
||||||
Canvas,
|
|
||||||
Circle,
|
|
||||||
Class,
|
|
||||||
Control,
|
|
||||||
control,
|
|
||||||
DivIcon,
|
|
||||||
DomEvent,
|
|
||||||
DomUtil,
|
|
||||||
Draggable,
|
|
||||||
Evented,
|
|
||||||
extend,
|
|
||||||
FeatureGroup,
|
|
||||||
featureGroup,
|
|
||||||
GeoJSON,
|
|
||||||
Handler,
|
|
||||||
Icon,
|
|
||||||
LatLng,
|
|
||||||
latLng,
|
|
||||||
LatLngBounds,
|
|
||||||
latLngBounds,
|
|
||||||
Layer,
|
|
||||||
LayerGroup,
|
|
||||||
LineUtil,
|
|
||||||
Map,
|
|
||||||
map,
|
|
||||||
Marker,
|
|
||||||
Mixin,
|
|
||||||
Path,
|
|
||||||
Point,
|
|
||||||
point,
|
|
||||||
Polygon,
|
|
||||||
Polyline,
|
|
||||||
polyline,
|
|
||||||
Popup,
|
|
||||||
Projection,
|
|
||||||
Rectangle,
|
|
||||||
rectangle,
|
|
||||||
setOptions,
|
|
||||||
stamp,
|
|
||||||
svg,
|
|
||||||
TileLayer,
|
|
||||||
Util,
|
|
||||||
} from '../../vendors/leaflet/leaflet-src.esm.js'
|
|
||||||
|
|
||||||
// expose the modules to the window.vendors global scope
|
|
||||||
window.L = {
|
|
||||||
bind,
|
|
||||||
Bounds,
|
|
||||||
Browser,
|
|
||||||
Canvas,
|
|
||||||
Circle,
|
|
||||||
Class,
|
|
||||||
Control,
|
|
||||||
control,
|
|
||||||
DivIcon,
|
|
||||||
DomEvent,
|
|
||||||
DomUtil,
|
|
||||||
Draggable,
|
|
||||||
Evented,
|
|
||||||
extend,
|
|
||||||
FeatureGroup,
|
|
||||||
featureGroup,
|
|
||||||
GeoJSON,
|
|
||||||
Handler,
|
|
||||||
Icon,
|
|
||||||
LatLng,
|
|
||||||
latLng,
|
|
||||||
LatLngBounds,
|
|
||||||
latLngBounds,
|
|
||||||
Layer,
|
|
||||||
LayerGroup,
|
|
||||||
LineUtil,
|
|
||||||
Map,
|
|
||||||
map,
|
|
||||||
Marker,
|
|
||||||
Mixin,
|
|
||||||
Path,
|
|
||||||
Point,
|
|
||||||
point,
|
|
||||||
Polygon,
|
|
||||||
Polyline,
|
|
||||||
polyline,
|
|
||||||
Popup,
|
|
||||||
Projection,
|
|
||||||
Rectangle,
|
|
||||||
rectangle,
|
|
||||||
setOptions,
|
|
||||||
stamp,
|
|
||||||
svg,
|
|
||||||
TileLayer,
|
|
||||||
Util,
|
|
||||||
}
|
|
||||||
|
|
||||||
export {
|
|
||||||
bind,
|
|
||||||
Bounds,
|
|
||||||
Browser,
|
|
||||||
Canvas,
|
|
||||||
Circle,
|
|
||||||
Class,
|
|
||||||
Control,
|
|
||||||
control,
|
|
||||||
DivIcon,
|
|
||||||
DomEvent,
|
|
||||||
DomUtil,
|
|
||||||
Draggable,
|
|
||||||
Evented,
|
|
||||||
extend,
|
|
||||||
FeatureGroup,
|
|
||||||
featureGroup,
|
|
||||||
GeoJSON,
|
|
||||||
Handler,
|
|
||||||
Icon,
|
|
||||||
LatLng,
|
|
||||||
latLng,
|
|
||||||
LatLngBounds,
|
|
||||||
latLngBounds,
|
|
||||||
Layer,
|
|
||||||
LayerGroup,
|
|
||||||
LineUtil,
|
|
||||||
Map,
|
|
||||||
map,
|
|
||||||
Marker,
|
|
||||||
Mixin,
|
|
||||||
Path,
|
|
||||||
Point,
|
|
||||||
point,
|
|
||||||
Polygon,
|
|
||||||
Polyline,
|
|
||||||
polyline,
|
|
||||||
Popup,
|
|
||||||
Projection,
|
|
||||||
Rectangle,
|
|
||||||
rectangle,
|
|
||||||
setOptions,
|
|
||||||
stamp,
|
|
||||||
svg,
|
|
||||||
TileLayer,
|
|
||||||
Util,
|
|
||||||
}
|
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<title>Umap front Tests</title>
|
<title>Umap front Tests</title>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<script type="module" src="{{ STATIC_URL }}umap/js/modules/vendors.js" defer></script>
|
<script type="module" src="../js/modules/global.js" defer></script>
|
||||||
<script src="../vendors/editable/Path.Drag.js" defer></script>
|
<script src="../vendors/editable/Path.Drag.js" defer></script>
|
||||||
<script src="../vendors/editable/Leaflet.Editable.js" defer></script>
|
<script src="../vendors/editable/Leaflet.Editable.js" defer></script>
|
||||||
<script src="../vendors/hash/leaflet-hash.js" defer></script>
|
<script src="../vendors/hash/leaflet-hash.js" defer></script>
|
||||||
|
@ -26,6 +26,7 @@
|
||||||
<script src="../vendors/dompurify/purify.js" defer></script>
|
<script src="../vendors/dompurify/purify.js" defer></script>
|
||||||
<script src="../vendors/togpx/togpx.js" defer></script>
|
<script src="../vendors/togpx/togpx.js" defer></script>
|
||||||
<script src="../vendors/tokml/tokml.js" defer></script>
|
<script src="../vendors/tokml/tokml.js" defer></script>
|
||||||
|
<script src="../vendors/iconlayers/iconLayers.js" defer></script>
|
||||||
<script src="../vendors/simple-statistics/simple-statistics.min.js" defer></script>
|
<script src="../vendors/simple-statistics/simple-statistics.min.js" defer></script>
|
||||||
<script src="../vendors/colorbrewer/colorbrewer.js" defer></script>
|
<script src="../vendors/colorbrewer/colorbrewer.js" defer></script>
|
||||||
<script type="module" src="../js/modules/index.js" defer></script>
|
<script type="module" src="../js/modules/index.js" defer></script>
|
||||||
|
@ -77,21 +78,21 @@
|
||||||
})
|
})
|
||||||
chai.config.includeStack = true
|
chai.config.includeStack = true
|
||||||
</script>
|
</script>
|
||||||
<script src="./_pre.js"></script>
|
<script src="./_pre.js" defer></script>
|
||||||
<script src="./Map.js"></script>
|
<script src="./Map.js" defer></script>
|
||||||
<script src="./Map.Init.js"></script>
|
<script src="./Map.Init.js" defer></script>
|
||||||
<script src="./Map.Export.js"></script>
|
<script src="./Map.Export.js" defer></script>
|
||||||
<script src="./DataLayer.js"></script>
|
<script src="./DataLayer.js" defer></script>
|
||||||
<script src="./TableEditor.js"></script>
|
<script src="./TableEditor.js" defer></script>
|
||||||
<script src="./Feature.js"></script>
|
<script src="./Feature.js" defer></script>
|
||||||
<script src="./Marker.js"></script>
|
<script src="./Marker.js" defer></script>
|
||||||
<script src="./Polyline.js"></script>
|
<script src="./Polyline.js" defer></script>
|
||||||
<script src="./Polygon.js"></script>
|
<script src="./Polygon.js" defer></script>
|
||||||
<script src="./Util.js"></script>
|
<script src="./Util.js" defer></script>
|
||||||
<script src="./Controls.js"></script>
|
<script src="./Controls.js" defer></script>
|
||||||
<script src="./Permissions.js"></script>
|
<script src="./Permissions.js" defer></script>
|
||||||
<script src="./Choropleth.js"></script>
|
<script src="./Choropleth.js" defer></script>
|
||||||
<script type="module" src="./URLs.js"></script>
|
<script type="module" src="./URLs.js" defer></script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#mocha {
|
#mocha {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -37,9 +37,8 @@
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
{% block bottom_js %}
|
{% block bottom_js %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window.addEventListener('DOMContentLoaded', (event => {
|
window.addEventListener('load', (event => {
|
||||||
|
|
||||||
!(function () {
|
!(function () {
|
||||||
const ui = new L.U.UI(document.querySelector('header'))
|
const ui = new L.U.UI(document.querySelector('header'))
|
||||||
|
@ -89,9 +88,9 @@
|
||||||
}
|
}
|
||||||
})(this)
|
})(this)
|
||||||
}
|
}
|
||||||
}))
|
))
|
||||||
</script>
|
</script>
|
||||||
{% endblock bottom_js %}
|
{% endblock bottom_js %}
|
||||||
{% block footer %}
|
{% block footer %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
{% include "umap/content_footer.html" %}
|
{% include "umap/content_footer.html" %}
|
||||||
|
|
|
@ -1,32 +1,42 @@
|
||||||
{% load compress %}
|
{% load compress %}
|
||||||
{% compress js %}
|
{% compress js %}
|
||||||
<script type="module" src="{{ STATIC_URL }}umap/js/modules/vendors.js" defer></script>
|
<script type="module" src="{{ STATIC_URL }}umap/js/modules/global.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/editable/Path.Drag.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/editable/Path.Drag.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/editable/Leaflet.Editable.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/editable/Leaflet.Editable.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/hash/leaflet-hash.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/hash/leaflet-hash.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/i18n/Leaflet.i18n.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/i18n/Leaflet.i18n.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/editinosm/Leaflet.EditInOSM.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/editinosm/Leaflet.EditInOSM.js"
|
||||||
|
defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/minimap/Control.MiniMap.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/minimap/Control.MiniMap.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/csv2geojson/csv2geojson.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/csv2geojson/csv2geojson.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/togeojson/togeojson.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/togeojson/togeojson.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/osmtogeojson/osmtogeojson.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/osmtogeojson/osmtogeojson.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/loading/Control.Loading.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/loading/Control.Loading.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/markercluster/leaflet.markercluster-src.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/markercluster/leaflet.markercluster-src.js"
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/contextmenu/leaflet.contextmenu.js" defer></script>
|
defer></script>
|
||||||
|
<script src="{{ STATIC_URL }}umap/vendors/contextmenu/leaflet.contextmenu.js"
|
||||||
|
defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/photon/leaflet.photon.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/photon/leaflet.photon.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/georsstogeojson/GeoRSSToGeoJSON.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/georsstogeojson/GeoRSSToGeoJSON.js"
|
||||||
|
defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/heat/leaflet-heat.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/heat/leaflet-heat.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/fullscreen/Leaflet.fullscreen.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/fullscreen/Leaflet.fullscreen.js"
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/toolbar/leaflet.toolbar-src.js" defer></script>
|
defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/formbuilder/Leaflet.FormBuilder.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/toolbar/leaflet.toolbar-src.js"
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/measurable/Leaflet.Measurable.js" defer></script>
|
defer></script>
|
||||||
|
<script src="{{ STATIC_URL }}umap/vendors/formbuilder/Leaflet.FormBuilder.js"
|
||||||
|
defer></script>
|
||||||
|
<script src="{{ STATIC_URL }}umap/vendors/measurable/Leaflet.Measurable.js"
|
||||||
|
defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/togpx/togpx.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/togpx/togpx.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/iconlayers/iconLayers.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/iconlayers/iconLayers.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/tokml/tokml.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/tokml/tokml.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/locatecontrol/L.Control.Locate.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/locatecontrol/L.Control.Locate.js"
|
||||||
|
defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/dompurify/purify.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/dompurify/purify.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/colorbrewer/colorbrewer.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/colorbrewer/colorbrewer.js" defer></script>
|
||||||
<script src="{{ STATIC_URL }}umap/vendors/simple-statistics/simple-statistics.min.js" defer></script>
|
<script src="{{ STATIC_URL }}umap/vendors/simple-statistics/simple-statistics.min.js"
|
||||||
|
defer></script>
|
||||||
{% endcompress %}
|
{% endcompress %}
|
||||||
{% if locale %}<script src="{{ STATIC_URL }}umap/locale/{{ locale }}.js" defer></script>{% endif %}
|
{% if locale %}<script src="{{ STATIC_URL }}umap/locale/{{ locale }}.js" defer></script>{% endif %}
|
||||||
{% compress js %}
|
{% compress js %}
|
||||||
|
|
Loading…
Reference in a new issue