umap-project 2.4.2__py3-none-any.whl → 2.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- umap/__init__.py +1 -1
- umap/locale/el/LC_MESSAGES/django.mo +0 -0
- umap/locale/eu/LC_MESSAGES/django.mo +0 -0
- umap/locale/hu/LC_MESSAGES/django.mo +0 -0
- umap/locale/hu/LC_MESSAGES/django.po +100 -50
- umap/static/umap/base.css +4 -1
- umap/static/umap/css/contextmenu.css +11 -0
- umap/static/umap/css/dialog.css +24 -3
- umap/static/umap/css/panel.css +4 -2
- umap/static/umap/css/slideshow.css +69 -0
- umap/static/umap/css/tableeditor.css +69 -0
- umap/static/umap/css/tooltip.css +3 -3
- umap/static/umap/img/16-white.svg +4 -0
- umap/static/umap/img/source/16-white.svg +5 -1
- umap/static/umap/js/components/alerts/alert.css +10 -10
- umap/static/umap/js/modules/autocomplete.js +23 -1
- umap/static/umap/js/modules/browser.js +14 -8
- umap/static/umap/js/modules/facets.js +40 -10
- umap/static/umap/js/modules/formatter.js +153 -0
- umap/static/umap/js/modules/global.js +10 -1
- umap/static/umap/js/modules/help.js +25 -25
- umap/static/umap/js/modules/importer.js +4 -4
- umap/static/umap/js/modules/importers/communesfr.js +3 -1
- umap/static/umap/js/modules/importers/datasets.js +8 -6
- umap/static/umap/js/modules/importers/geodatamine.js +10 -10
- umap/static/umap/js/modules/importers/overpass.js +18 -14
- umap/static/umap/js/modules/rules.js +13 -1
- umap/static/umap/js/modules/schema.js +16 -12
- umap/static/umap/js/{umap.share.js → modules/share.js} +60 -99
- umap/static/umap/js/modules/slideshow.js +141 -0
- umap/static/umap/js/modules/tableeditor.js +329 -0
- umap/static/umap/js/modules/ui/base.js +93 -0
- umap/static/umap/js/modules/ui/contextmenu.js +50 -0
- umap/static/umap/js/modules/ui/dialog.js +169 -31
- umap/static/umap/js/modules/ui/panel.js +6 -4
- umap/static/umap/js/modules/ui/tooltip.js +5 -75
- umap/static/umap/js/modules/utils.js +20 -0
- umap/static/umap/js/umap.controls.js +1 -1
- umap/static/umap/js/umap.features.js +22 -14
- umap/static/umap/js/umap.forms.js +157 -154
- umap/static/umap/js/umap.js +48 -34
- umap/static/umap/js/umap.layer.js +232 -164
- umap/static/umap/js/umap.permissions.js +1 -1
- umap/static/umap/js/umap.popup.js +1 -1
- umap/static/umap/locale/am_ET.js +22 -5
- umap/static/umap/locale/am_ET.json +19 -5
- umap/static/umap/locale/ar.js +22 -5
- umap/static/umap/locale/ar.json +19 -5
- umap/static/umap/locale/ast.js +22 -5
- umap/static/umap/locale/ast.json +19 -5
- umap/static/umap/locale/bg.js +22 -5
- umap/static/umap/locale/bg.json +19 -5
- umap/static/umap/locale/br.js +22 -5
- umap/static/umap/locale/br.json +19 -5
- umap/static/umap/locale/ca.js +56 -39
- umap/static/umap/locale/ca.json +53 -39
- umap/static/umap/locale/cs_CZ.js +22 -5
- umap/static/umap/locale/cs_CZ.json +19 -5
- umap/static/umap/locale/da.js +22 -5
- umap/static/umap/locale/da.json +19 -5
- umap/static/umap/locale/de.js +22 -5
- umap/static/umap/locale/de.json +19 -5
- umap/static/umap/locale/el.js +27 -10
- umap/static/umap/locale/el.json +19 -5
- umap/static/umap/locale/en.js +22 -6
- umap/static/umap/locale/en.json +19 -5
- umap/static/umap/locale/en_US.json +19 -5
- umap/static/umap/locale/es.js +22 -6
- umap/static/umap/locale/es.json +19 -5
- umap/static/umap/locale/et.js +22 -5
- umap/static/umap/locale/et.json +19 -5
- umap/static/umap/locale/eu.js +167 -150
- umap/static/umap/locale/eu.json +167 -150
- umap/static/umap/locale/fa_IR.js +22 -5
- umap/static/umap/locale/fa_IR.json +19 -5
- umap/static/umap/locale/fi.js +22 -5
- umap/static/umap/locale/fi.json +19 -5
- umap/static/umap/locale/fr.js +22 -6
- umap/static/umap/locale/fr.json +19 -5
- umap/static/umap/locale/gl.js +22 -5
- umap/static/umap/locale/gl.json +19 -5
- umap/static/umap/locale/he.js +22 -5
- umap/static/umap/locale/he.json +19 -5
- umap/static/umap/locale/hr.js +22 -5
- umap/static/umap/locale/hr.json +19 -5
- umap/static/umap/locale/hu.js +89 -72
- umap/static/umap/locale/hu.json +89 -75
- umap/static/umap/locale/id.js +22 -5
- umap/static/umap/locale/id.json +19 -5
- umap/static/umap/locale/is.js +22 -5
- umap/static/umap/locale/is.json +19 -5
- umap/static/umap/locale/it.js +22 -5
- umap/static/umap/locale/it.json +19 -5
- umap/static/umap/locale/ja.js +22 -5
- umap/static/umap/locale/ja.json +19 -5
- umap/static/umap/locale/ko.js +22 -5
- umap/static/umap/locale/ko.json +19 -5
- umap/static/umap/locale/lt.js +22 -5
- umap/static/umap/locale/lt.json +19 -5
- umap/static/umap/locale/ms.js +22 -5
- umap/static/umap/locale/ms.json +19 -5
- umap/static/umap/locale/nl.js +22 -5
- umap/static/umap/locale/nl.json +19 -5
- umap/static/umap/locale/no.js +22 -5
- umap/static/umap/locale/no.json +19 -5
- umap/static/umap/locale/pl.js +22 -5
- umap/static/umap/locale/pl.json +19 -5
- umap/static/umap/locale/pl_PL.json +19 -5
- umap/static/umap/locale/pt.js +22 -6
- umap/static/umap/locale/pt.json +21 -7
- umap/static/umap/locale/pt_BR.js +22 -5
- umap/static/umap/locale/pt_BR.json +19 -5
- umap/static/umap/locale/pt_PT.js +22 -5
- umap/static/umap/locale/pt_PT.json +19 -5
- umap/static/umap/locale/ro.js +22 -5
- umap/static/umap/locale/ro.json +19 -5
- umap/static/umap/locale/ru.js +22 -5
- umap/static/umap/locale/ru.json +19 -5
- umap/static/umap/locale/sk_SK.js +22 -5
- umap/static/umap/locale/sk_SK.json +19 -5
- umap/static/umap/locale/sl.js +22 -5
- umap/static/umap/locale/sl.json +19 -5
- umap/static/umap/locale/sr.js +22 -5
- umap/static/umap/locale/sr.json +19 -5
- umap/static/umap/locale/sv.js +22 -5
- umap/static/umap/locale/sv.json +19 -5
- umap/static/umap/locale/th_TH.js +22 -5
- umap/static/umap/locale/th_TH.json +19 -5
- umap/static/umap/locale/tr.js +22 -5
- umap/static/umap/locale/tr.json +19 -5
- umap/static/umap/locale/uk_UA.js +22 -5
- umap/static/umap/locale/uk_UA.json +19 -5
- umap/static/umap/locale/vi.js +22 -5
- umap/static/umap/locale/vi.json +19 -5
- umap/static/umap/locale/vi_VN.json +19 -5
- umap/static/umap/locale/zh.js +22 -5
- umap/static/umap/locale/zh.json +19 -5
- umap/static/umap/locale/zh_CN.json +19 -5
- umap/static/umap/locale/zh_TW.Big5.json +19 -5
- umap/static/umap/locale/zh_TW.js +22 -5
- umap/static/umap/locale/zh_TW.json +19 -5
- umap/static/umap/map.css +2 -145
- umap/static/umap/vars.css +5 -0
- umap/static/umap/vendors/formbuilder/Leaflet.FormBuilder.js +410 -428
- umap/static/umap/vendors/geojson-to-gpx/index.js +155 -0
- umap/static/umap/vendors/osmtogeojson/osmtogeojson.js +1 -2
- umap/static/umap/vendors/togeojson/togeojson.es.js +1109 -0
- umap/static/umap/vendors/togeojson/{togeojson.umd.js.map → togeojson.es.mjs.map} +1 -1
- umap/static/umap/vendors/tokml/tokml.es.js +895 -0
- umap/static/umap/vendors/tokml/tokml.es.mjs.map +1 -0
- umap/storage.py +5 -1
- umap/templates/umap/components/alerts/alert.html +3 -3
- umap/templates/umap/css.html +3 -0
- umap/templates/umap/js.html +0 -6
- umap/tests/fixtures/categorized_highway.geojson +1 -0
- umap/tests/fixtures/test_import_osm_relation.json +130 -0
- umap/tests/integration/conftest.py +8 -1
- umap/tests/integration/test_browser.py +3 -2
- umap/tests/integration/test_categorized_layer.py +141 -0
- umap/tests/integration/test_conditional_rules.py +21 -0
- umap/tests/integration/test_datalayer.py +9 -4
- umap/tests/integration/test_edit_datalayer.py +1 -0
- umap/tests/integration/test_edit_polygon.py +1 -1
- umap/tests/integration/test_export_map.py +2 -3
- umap/tests/integration/test_import.py +22 -0
- umap/tests/integration/test_tableeditor.py +158 -4
- umap/tests/integration/test_websocket_sync.py +2 -2
- {umap_project-2.4.2.dist-info → umap_project-2.5.0.dist-info}/METADATA +8 -8
- {umap_project-2.4.2.dist-info → umap_project-2.5.0.dist-info}/RECORD +172 -162
- umap/static/umap/js/umap.slideshow.js +0 -163
- umap/static/umap/js/umap.tableeditor.js +0 -118
- umap/static/umap/vendors/togeojson/togeojson.umd.js +0 -2
- umap/static/umap/vendors/togpx/togpx.js +0 -547
- umap/static/umap/vendors/tokml/tokml.js +0 -343
- {umap_project-2.4.2.dist-info → umap_project-2.5.0.dist-info}/WHEEL +0 -0
- {umap_project-2.4.2.dist-info → umap_project-2.5.0.dist-info}/entry_points.txt +0 -0
- {umap_project-2.4.2.dist-info → umap_project-2.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokml.es.mjs","sources":["../node_modules/unist-builder/index.js","../node_modules/xastscript/lib/index.js","../node_modules/xast-util-to-xml/lib/all.js","../node_modules/stringify-entities/lib/core.js","../node_modules/stringify-entities/lib/util/format-basic.js","../node_modules/stringify-entities/lib/index.js","../node_modules/xast-util-to-xml/lib/util-escape.js","../node_modules/xast-util-to-xml/lib/name.js","../node_modules/ccount/index.js","../node_modules/xast-util-to-xml/lib/value.js","../node_modules/xast-util-to-xml/lib/element.js","../node_modules/xast-util-to-xml/lib/text.js","../node_modules/xast-util-to-xml/lib/comment.js","../node_modules/xast-util-to-xml/lib/doctype.js","../node_modules/xast-util-to-xml/lib/instruction.js","../node_modules/xast-util-to-xml/lib/cdata.js","../node_modules/xast-util-to-xml/lib/raw.js","../node_modules/xast-util-to-xml/lib/one.js","../node_modules/xast-util-to-xml/lib/index.js","../lib/index.ts"],"sourcesContent":["/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n * @typedef {import('unist').Literal} Literal\n * @typedef {Object.<string, unknown>} Props\n * @typedef {Array.<Node>|string} ChildrenOrValue\n *\n * @typedef {(<T extends string, P extends Record<string, unknown>, C extends Node[]>(type: T, props: P, children: C) => {type: T, children: C} & P)} BuildParentWithProps\n * @typedef {(<T extends string, P extends Record<string, unknown>>(type: T, props: P, value: string) => {type: T, value: string} & P)} BuildLiteralWithProps\n * @typedef {(<T extends string, P extends Record<string, unknown>>(type: T, props: P) => {type: T} & P)} BuildVoidWithProps\n * @typedef {(<T extends string, C extends Node[]>(type: T, children: C) => {type: T, children: C})} BuildParent\n * @typedef {(<T extends string>(type: T, value: string) => {type: T, value: string})} BuildLiteral\n * @typedef {(<T extends string>(type: T) => {type: T})} BuildVoid\n */\n\nexport var u = /**\n * @type {BuildVoid & BuildVoidWithProps & BuildLiteral & BuildLiteralWithProps & BuildParent & BuildParentWithProps}\n */ (\n /**\n * @param {string} type Type of node\n * @param {Props|ChildrenOrValue} [props] Additional properties for node (or `children` or `value`)\n * @param {ChildrenOrValue} [value] `children` or `value` of node\n * @returns {Node}\n */\n function (type, props, value) {\n /** @type {Node} */\n var node = {type: String(type)}\n\n if (\n (value === undefined || value === null) &&\n (typeof props === 'string' || Array.isArray(props))\n ) {\n value = props\n } else {\n Object.assign(node, props)\n }\n\n if (Array.isArray(value)) {\n node.children = value\n } else if (value !== undefined && value !== null) {\n node.value = String(value)\n }\n\n return node\n }\n)\n","/**\n * @typedef {import('xast').Root} Root\n * @typedef {import('xast').Element} Element\n * @typedef {Root['children'][number]} Child\n * @typedef {Child|Root} Node\n * @typedef {Root|Element} XResult\n * @typedef {string|number|boolean|null|undefined} XValue\n * @typedef {{[attribute: string]: XValue}} XAttributes Attributes to support JS primitive types\n *\n * @typedef {string|number|null|undefined} XPrimitiveChild\n * @typedef {Array.<Node|XPrimitiveChild>} XArrayChild\n * @typedef {Node|XPrimitiveChild|XArrayChild} XChild\n * @typedef {import('./jsx-classic').Element} x.JSX.Element\n * @typedef {import('./jsx-classic').IntrinsicAttributes} x.JSX.IntrinsicAttributes\n * @typedef {import('./jsx-classic').IntrinsicElements} x.JSX.IntrinsicElements\n * @typedef {import('./jsx-classic').ElementChildrenAttribute} x.JSX.ElementChildrenAttribute\n */\n\n/**\n * Create XML trees in xast.\n *\n * @param name Qualified name. Case sensitive and can contain a namespace prefix (such as `rdf:RDF`). Pass `null|undefined` to build a root.\n * @param attributes Map of attributes. Nullish (null or undefined) or NaN values are ignored, other values (strings, booleans) are cast to strings.\n * @param children (Lists of) child nodes. When strings are encountered, they are mapped to Text nodes.\n */\nexport const x =\n /**\n * @type {{\n * (): Root\n * (name: null|undefined, ...children: XChild[]): Root\n * (name: string, attributes: XAttributes, ...children: XChild[]): Element\n * (name: string, ...children: XChild[]): Element\n * }}\n */\n (\n /**\n * Hyperscript compatible DSL for creating virtual xast trees.\n *\n * @param {string|null} [name]\n * @param {XAttributes|XChild} [attributes]\n * @param {XChild[]} children\n * @returns {XResult}\n */\n function (name, attributes, ...children) {\n var index = -1\n /** @type {XResult} */\n var node\n /** @type {string} */\n var key\n\n if (name === undefined || name === null) {\n node = {type: 'root', children: []}\n // @ts-ignore Root builder doesn’t accept attributes.\n children.unshift(attributes)\n } else if (typeof name === 'string') {\n node = {type: 'element', name, attributes: {}, children: []}\n\n if (isAttributes(attributes)) {\n for (key in attributes) {\n // Ignore nullish and NaN values.\n if (\n attributes[key] !== undefined &&\n attributes[key] !== null &&\n (typeof attributes[key] !== 'number' ||\n !Number.isNaN(attributes[key]))\n ) {\n // @ts-ignore Pretty sure we just set it.\n node.attributes[key] = String(attributes[key])\n }\n }\n } else {\n children.unshift(attributes)\n }\n } else {\n throw new TypeError('Expected element name, got `' + name + '`')\n }\n\n // Handle children.\n while (++index < children.length) {\n addChild(node.children, children[index])\n }\n\n return node\n }\n )\n\n/**\n * @param {Array.<Child>} nodes\n * @param {XChild} value\n */\nfunction addChild(nodes, value) {\n var index = -1\n\n if (value === undefined || value === null) {\n // Empty.\n } else if (typeof value === 'string' || typeof value === 'number') {\n nodes.push({type: 'text', value: String(value)})\n } else if (Array.isArray(value)) {\n while (++index < value.length) {\n addChild(nodes, value[index])\n }\n } else if (typeof value === 'object' && 'type' in value) {\n if (value.type === 'root') {\n addChild(nodes, value.children)\n } else {\n nodes.push(value)\n }\n } else {\n throw new TypeError('Expected node, nodes, string, got `' + value + '`')\n }\n}\n\n/**\n * @param {XAttributes|XChild} value\n * @returns {value is XAttributes}\n */\nfunction isAttributes(value) {\n if (\n value === null ||\n value === undefined ||\n typeof value !== 'object' ||\n Array.isArray(value)\n ) {\n return false\n }\n\n return true\n}\n","/**\n * @typedef {import('./index.js').Parent} Parent\n * @typedef {import('./index.js').Context} Context\n * @typedef {import('./index.js').Child} Child\n */\n\nimport {one} from './one.js'\n\n/**\n * Serialize all children of `parent`.\n *\n * @param {Parent} parent\n * @param {Context} ctx\n * @returns {string}\n *\n */\nexport function all(parent, ctx) {\n /** @type {Array.<Child>} */\n var children = (parent && parent.children) || []\n var index = -1\n /** @type {Array.<string>} */\n var results = []\n\n while (++index < children.length) {\n results[index] = one(children[index], ctx)\n }\n\n return results.join('')\n}\n","/**\n * @typedef {Object} CoreOptions\n * @property {string[]} [subset=[]]\n * Whether to only escape the given subset of characters.\n * @property {boolean} [escapeOnly=false]\n * Whether to only escape possibly dangerous characters.\n * Those characters are `\"`, `&`, `'`, `<`, `>`, and `` ` ``.\n *\n * @typedef {Object} FormatOptions\n * @property {(code: number, next: number, options: CoreWithFormatOptions) => string} format\n * Format strategy.\n *\n * @typedef {CoreOptions & FormatOptions & import('./util/format-smart.js').FormatSmartOptions} CoreWithFormatOptions\n */\n\n/**\n * Encode certain characters in `value`.\n *\n * @param {string} value\n * @param {CoreWithFormatOptions} options\n * @returns {string}\n */\nexport function core(value, options) {\n value = value.replace(\n options.subset ? charactersToExpression(options.subset) : /[\"&'<>`]/g,\n basic\n )\n\n if (options.subset || options.escapeOnly) {\n return value\n }\n\n return (\n value\n // Surrogate pairs.\n .replace(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g, surrogate)\n // BMP control characters (C0 except for LF, CR, SP; DEL; and some more\n // non-ASCII ones).\n .replace(\n // eslint-disable-next-line no-control-regex, unicorn/no-hex-escape\n /[\\x01-\\t\\v\\f\\x0E-\\x1F\\x7F\\x81\\x8D\\x8F\\x90\\x9D\\xA0-\\uFFFF]/g,\n basic\n )\n )\n\n /**\n * @param {string} pair\n * @param {number} index\n * @param {string} all\n */\n function surrogate(pair, index, all) {\n return options.format(\n (pair.charCodeAt(0) - 0xd800) * 0x400 +\n pair.charCodeAt(1) -\n 0xdc00 +\n 0x10000,\n all.charCodeAt(index + 2),\n options\n )\n }\n\n /**\n * @param {string} character\n * @param {number} index\n * @param {string} all\n */\n function basic(character, index, all) {\n return options.format(\n character.charCodeAt(0),\n all.charCodeAt(index + 1),\n options\n )\n }\n}\n\n/**\n * @param {string[]} subset\n * @returns {RegExp}\n */\nfunction charactersToExpression(subset) {\n /** @type {string[]} */\n const groups = []\n let index = -1\n\n while (++index < subset.length) {\n groups.push(subset[index].replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&'))\n }\n\n return new RegExp('(?:' + groups.join('|') + ')', 'g')\n}\n","/**\n * The smallest way to encode a character.\n *\n * @param {number} code\n * @returns {string}\n */\nexport function formatBasic(code) {\n return '&#x' + code.toString(16).toUpperCase() + ';'\n}\n","/**\n * @typedef {import('./core.js').CoreOptions & import('./util/format-smart.js').FormatSmartOptions} Options\n * @typedef {import('./core.js').CoreOptions} LightOptions\n */\n\nimport {core} from './core.js'\nimport {formatSmart} from './util/format-smart.js'\nimport {formatBasic} from './util/format-basic.js'\n\n/**\n * Encode special characters in `value`.\n *\n * @param {string} value\n * Value to encode.\n * @param {Options} [options]\n * Configuration.\n * @returns {string}\n * Encoded value.\n */\nexport function stringifyEntities(value, options) {\n return core(value, Object.assign({format: formatSmart}, options))\n}\n\n/**\n * Encode special characters in `value` as hexadecimals.\n *\n * @param {string} value\n * Value to encode.\n * @param {LightOptions} [options]\n * Configuration.\n * @returns {string}\n * Encoded value.\n */\nexport function stringifyEntitiesLight(value, options) {\n return core(value, Object.assign({format: formatBasic}, options))\n}\n","import {stringifyEntitiesLight} from 'stringify-entities'\n\nvar noncharacter = /[\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F]/g\n\n/**\n * Escape a string.\n *\n * @param {string} value\n * @param {Array.<string>} subset\n * @param {RegExp} [unsafe]\n * @returns {string}\n */\nexport function escape(value, subset, unsafe) {\n var result = clean(value)\n\n return unsafe ? result.replace(unsafe, encode) : encode(result)\n\n /**\n * @param {string} $0\n * @returns {string}\n */\n function encode($0) {\n return stringifyEntitiesLight($0, {subset})\n }\n}\n\n/**\n * @param {string} value\n * @returns {string}\n */\nfunction clean(value) {\n return String(value || '').replace(noncharacter, '')\n}\n","import {escape} from './util-escape.js'\n\nvar subset = ['\\t', '\\n', ' ', '\"', '&', \"'\", '/', '<', '=', '>']\n\n/**\n * Serialize a node name.\n *\n * @param {string} value\n * @returns {string}\n */\nexport function name(value) {\n return escape(value, subset)\n}\n","/**\n * Count how often a character (or substring) is used in a string.\n *\n * @param {string} value\n * Value to search in.\n * @param {string} character\n * Character (or substring) to look for.\n * @return {number}\n * Number of times `character` occurred in `value`.\n */\nexport function ccount(value, character) {\n const source = String(value)\n\n if (typeof character !== 'string') {\n throw new TypeError('Expected character')\n }\n\n let count = 0\n let index = source.indexOf(character)\n\n while (index !== -1) {\n count++\n index = source.indexOf(character, index + character.length)\n }\n\n return count\n}\n","/**\n * @typedef {import('./index.js').Context} Context\n */\n\nimport {ccount} from 'ccount'\nimport {escape} from './util-escape.js'\n\n/**\n * Serialize an attribute value.\n *\n * @param {string} value\n * @param {Context} ctx\n * @returns {string}\n */\nexport function value(value, ctx) {\n var primary = ctx.quote\n var secondary = ctx.alternative\n var result = String(value)\n var quote =\n secondary && ccount(result, primary) > ccount(result, secondary)\n ? secondary\n : primary\n\n return quote + escape(result, ['<', '&', quote]) + quote\n}\n","/**\n * @typedef {import('./index.js').Handle} Handle\n * @typedef {import('./index.js').Element} Element\n * @typedef {import('./index.js').Attributes} Attributes\n */\n\nimport {all} from './all.js'\nimport {name} from './name.js'\nimport {value} from './value.js'\n\nvar own = {}.hasOwnProperty\n\n/**\n * Serialize an element.\n *\n * @type {Handle}\n * @param {Element} node\n */\nexport function element(node, ctx) {\n var nodeName = name(node.name)\n var content = all(node, ctx)\n /** @type {Attributes} */\n var attributes = node.attributes || {}\n var close = content ? false : ctx.close\n /** @type {Array.<string>} */\n var attrs = []\n /** @type {string} */\n var key\n /** @type {Attributes[keyof Attributes]} */\n var result\n\n for (key in attributes) {\n if (own.call(attributes, key)) {\n result = attributes[key]\n\n if (result !== null && result !== undefined) {\n attrs.push(name(key) + '=' + value(result, ctx))\n }\n }\n }\n\n return (\n '<' +\n nodeName +\n (attrs.length === 0 ? '' : ' ' + attrs.join(' ')) +\n (close ? (ctx.tight ? '' : ' ') + '/' : '') +\n '>' +\n content +\n (close ? '' : '</' + nodeName + '>')\n )\n}\n","/**\n * @typedef {import('./index.js').Handle} Handle\n * @typedef {import('./index.js').Text} Text\n */\n\nimport {escape} from './util-escape.js'\n\nvar subset = ['&', '<']\n\n/**\n * Serialize a text.\n *\n * @type {Handle}\n * @param {Text} node\n */\nexport function text(node) {\n return escape(node.value, subset)\n}\n","/**\n * @typedef {import('./index.js').Handle} Handle\n * @typedef {import('./index.js').Comment} Comment\n */\n\nimport {escape} from './util-escape.js'\n\n/**\n * Serialize a comment.\n *\n * @type {Handle}\n * @param {Comment} node\n */\nexport function comment(node) {\n return '<!--' + escape(node.value, ['-']) + '-->'\n}\n","/**\n * @typedef {import('./index.js').Handle} Handle\n * @typedef {import('./index.js').Doctype} Doctype\n */\n\nimport {name} from './name.js'\nimport {value} from './value.js'\n\n/**\n * Serialize a doctype.\n *\n * @type {Handle}\n * @param {Doctype} node\n */\nexport function doctype(node, ctx) {\n var nodeName = name(node.name)\n var pub = node.public\n var sys = node.system\n var result = '<!DOCTYPE'\n\n if (nodeName !== '') {\n result += ' ' + nodeName\n }\n\n if (pub !== null && pub !== undefined && pub !== '') {\n result += ' PUBLIC ' + value(pub, ctx)\n } else if (sys !== null && sys !== undefined && sys !== '') {\n result += ' SYSTEM'\n }\n\n if (sys !== null && sys !== undefined && sys !== '') {\n result += ' ' + value(sys, ctx)\n }\n\n return result + '>'\n}\n","/**\n * @typedef {import('./index.js').Handle} Handle\n * @typedef {import('./index.js').Instruction} Instruction\n */\n\nimport {escape} from './util-escape.js'\nimport {name} from './name.js'\n\nvar unsafe = /\\?>/g\nvar subset = ['>']\n\n/**\n * Serialize an instruction.\n *\n * @type {Handle}\n * @param {Instruction} node\n */\nexport function instruction(node) {\n var nodeName = name(node.name) || 'x'\n var result = escape(node.value, subset, unsafe)\n return '<?' + nodeName + (result ? ' ' + result : '') + '?>'\n}\n","/**\n * @typedef {import('./index.js').Handle} Handle\n * @typedef {import('./index.js').Cdata} Cdata\n */\n\nimport {escape} from './util-escape.js'\n\nvar unsafe = /]]>/g\nvar subset = ['>']\n\n/**\n * Serialize a CDATA section.\n *\n * @type {Handle}\n * @param {Cdata} node\n */\nexport function cdata(node) {\n return '<![CDATA[' + escape(node.value, subset, unsafe) + ']]>'\n}\n","/**\n * @typedef {import('./index.js').Handle} Handle\n * @typedef {import('./index.js').Raw} Raw\n */\n\nimport {text} from './text.js'\n\n/**\n * Serialize a (non-standard) raw.\n *\n * @type {Handle}\n * @param {Raw} node\n */\nexport function raw(node, ctx) {\n // @ts-ignore Looks like a text.\n return ctx.dangerous ? node.value : text(node)\n}\n","/**\n * @typedef {import('./index.js').Handle} Handle\n */\n\nimport {all} from './all.js'\nimport {element} from './element.js'\nimport {text} from './text.js'\nimport {comment} from './comment.js'\nimport {doctype} from './doctype.js'\nimport {instruction} from './instruction.js'\nimport {cdata} from './cdata.js'\nimport {raw} from './raw.js'\n\nvar own = {}.hasOwnProperty\n\nvar handlers = {\n root: all,\n element,\n text,\n comment,\n doctype,\n instruction,\n cdata,\n raw\n}\n\n/**\n * Serialize a node.\n *\n * @type {Handle}\n */\nexport function one(node, ctx) {\n var type = node && node.type\n\n if (!type) {\n throw new Error('Expected node, not `' + node + '`')\n }\n\n if (!own.call(handlers, type)) {\n throw new Error('Cannot compile unknown node `' + type + '`')\n }\n\n // @ts-ignore Hush, it works.\n return handlers[type](node, ctx)\n}\n","/**\n * @typedef {import('xast').Root} Root\n * @typedef {import('xast').Element} Element\n * @typedef {import('xast').Cdata} Cdata\n * @typedef {import('xast').Comment} Comment\n * @typedef {import('xast').Doctype} Doctype\n * @typedef {import('xast').Instruction} Instruction\n * @typedef {import('xast').Text} Text\n * @typedef {import('xast').Literal & {type: 'raw'}} Raw\n * @typedef {Root|Element} Parent\n * @typedef {import('xast').Attributes} Attributes\n * @typedef {Root['children'][number]} Child\n * @typedef {Child|Root} Node\n *\n * @typedef {'\"'|\"'\"} Quote\n *\n * @typedef Options\n * @property {Quote} [quote='\"'] Preferred quote to use\n * @property {boolean} [quoteSmart=false] Use the other quote if that results in\n * less bytes\n * @property {boolean} [closeEmptyElements=false] Close elements without any\n * content with slash (/) on the opening tag instead of an end tag:\n * `<circle />` instead of `<circle></circle>`.\n * See `tightClose` to control whether a space is used before the slash.\n * @property {boolean} [tightClose=false] Do not use an extra space when closing\n * self-closing elements: `<circle/>` instead of `<circle />`.\n * @property {boolean} [allowDangerousXml=false] Allow `raw` nodes and insert\n * them as raw XML. When falsey, encodes `raw` nodes.\n * Only set this if you completely trust the content!\n *\n * @typedef Context\n * @property {Quote} quote\n * @property {Quote} alternative\n * @property {boolean} close\n * @property {boolean} tight\n * @property {boolean} dangerous\n *\n * @callback Handle\n * @param {Node} node\n * @param {Context} context\n * @returns {string}\n */\n\nimport {one} from './one.js'\n\n/**\n * Serialize the given xast tree (or list of nodes).\n *\n * @param {Node|Array.<Node>} node\n * @param {Options} [options]\n * @returns {string}\n */\nexport function toXml(node, options = {}) {\n var quote = options.quote || '\"'\n /** @type {Quote} */\n var alternative = quote === '\"' ? \"'\" : '\"'\n var smart = options.quoteSmart\n /** @type {Node} */\n // @ts-ignore Assume no `root` in `node`.\n var value = Array.isArray(node) ? {type: 'root', children: node} : node\n\n if (quote !== '\"' && quote !== \"'\") {\n throw new Error('Invalid quote `' + quote + '`, expected `\\'` or `\"`')\n }\n\n return one(value, {\n dangerous: options.allowDangerousXml,\n close: options.closeEmptyElements,\n tight: options.tightClose,\n quote,\n alternative: smart ? alternative : null\n })\n}\n","import { u } from 'unist-builder';\nimport { x } from 'xastscript';\nimport type { Element } from 'xast';\nimport type { Root, Folder } from '@tmcw/togeojson';\nimport type { Feature, FeatureCollection, Geometry, Position } from 'geojson';\nimport { toXml } from 'xast-util-to-xml';\n\ntype F = Feature<Geometry | null>;\n\nconst BR = u('text', '\\n');\nconst TAB = u('text', ' ');\n\ntype Literal = typeof BR;\n\n/**\n * Convert nested folder structure to KML. This expects\n * input that follows the same patterns as [toGeoJSON](https://github.com/placemark/togeojson)'s\n * kmlWithFolders method: a tree of folders and features,\n * starting with a root element.\n */\nexport function foldersToKML(root: Root): string {\n return toXml(\n u('root', [\n x(\n 'kml',\n { xmlns: 'http://www.opengis.net/kml/2.2' },\n x(\n 'Document',\n root.children.flatMap((child) => convertChild(child))\n )\n ),\n ])\n );\n}\n\n/**\n * Convert a GeoJSON FeatureCollection to a string of\n * KML data.\n */\nexport function toKML(\n featureCollection: FeatureCollection<Geometry | null>\n): string {\n return toXml(\n u('root', [\n x(\n 'kml',\n { xmlns: 'http://www.opengis.net/kml/2.2' },\n x(\n 'Document',\n featureCollection.features.flatMap((feature) =>\n convertFeature(feature)\n )\n )\n ),\n ])\n );\n}\n\nfunction convertChild(child: F | Folder) {\n switch (child.type) {\n case 'Feature':\n return convertFeature(child);\n case 'folder':\n return convertFolder(child);\n }\n}\n\nfunction convertFolder(folder: Folder): Array<Literal | Element> {\n const id = ['string', 'number'].includes(typeof folder.meta.id)\n ? {\n id: String(folder.meta.id),\n }\n : {};\n return [\n BR,\n x('Folder', id, [\n BR,\n ...folderMeta(folder.meta),\n BR,\n TAB,\n ...folder.children.flatMap((child) => convertChild(child)),\n ]),\n ];\n}\n\nconst META_PROPERTIES = [\n 'address',\n 'description',\n 'name',\n 'open',\n 'visibility',\n 'phoneNumber',\n] as const;\n\nfunction folderMeta(meta: Folder['meta']): Element[] {\n return META_PROPERTIES.filter((p) => meta[p] !== undefined).map((p) => {\n return x(p, [u('text', String(meta[p]))]);\n });\n}\n\nfunction convertFeature(feature: F) {\n const { id } = feature;\n const idMember = ['string', 'number'].includes(typeof id)\n ? {\n id: id,\n }\n : {};\n return [\n BR,\n x('Placemark', idMember, [\n BR,\n ...propertiesToTags(feature.properties),\n BR,\n TAB,\n ...(feature.geometry ? [convertGeometry(feature.geometry)] : []),\n ]),\n ];\n}\n\nfunction join(position: Position): string {\n return `${position[0]},${position[1]}`;\n}\n\nfunction coord1(coordinates: Position): Element {\n return x('coordinates', [u('text', join(coordinates))]);\n}\n\nfunction coord2(coordinates: Position[]): Element {\n return x('coordinates', [u('text', coordinates.map(join).join('\\n'))]);\n}\n\nfunction toString(value: any): string {\n switch (typeof value) {\n case 'string': {\n return value;\n }\n case 'boolean':\n case 'number': {\n return String(value);\n }\n case 'object': {\n try {\n return JSON.stringify(value);\n } catch (e) {\n return '';\n }\n }\n }\n return '';\n}\n\nfunction maybeCData(value: any) {\n if (\n value &&\n typeof value === 'object' &&\n '@type' in value &&\n value['@type'] === 'html' &&\n 'value' in value &&\n typeof value.value === 'string'\n ) {\n return u('cdata', value.value);\n }\n\n return toString(value);\n}\n\nfunction propertiesToTags(properties: Feature['properties']): Element[] {\n if (!properties) return [];\n const { name, description, visibility, ...otherProperties } = properties;\n\n return [\n name && x('name', [u('text', toString(name))]),\n description && x('description', [u('text', maybeCData(description))]),\n visibility !== undefined &&\n x('visibility', [u('text', visibility ? '1' : '0')]),\n x(\n 'ExtendedData',\n Object.entries(otherProperties).flatMap(([name, value]) => [\n BR,\n TAB,\n x('Data', { name: name }, [\n x('value', [\n u(\n 'text',\n typeof value === 'string' ? value : JSON.stringify(value)\n ),\n ]),\n ]),\n ])\n ),\n ].filter(Boolean);\n}\n\nconst linearRing = (ring: Position[]): Element =>\n x('LinearRing', [coord2(ring)]);\n\nfunction convertMultiPoint(geometry: GeoJSON.MultiPoint): Element {\n return x(\n 'MultiGeometry',\n geometry.coordinates.flatMap((coordinates) => [\n BR,\n convertGeometry({\n type: 'Point',\n coordinates,\n }),\n ])\n );\n}\nfunction convertMultiLineString(geometry: GeoJSON.MultiLineString): Element {\n return x(\n 'MultiGeometry',\n geometry.coordinates.flatMap((coordinates) => [\n BR,\n convertGeometry({\n type: 'LineString',\n coordinates,\n }),\n ])\n );\n}\n\nfunction convertMultiPolygon(geometry: GeoJSON.MultiPolygon): Element {\n return x(\n 'MultiGeometry',\n geometry.coordinates.flatMap((coordinates) => [\n BR,\n convertGeometry({\n type: 'Polygon',\n coordinates,\n }),\n ])\n );\n}\n\nfunction convertPolygon(geometry: GeoJSON.Polygon): Element {\n const [outerBoundary, ...innerRings] = geometry.coordinates;\n return x('Polygon', [\n BR,\n x('outerBoundaryIs', [BR, TAB, linearRing(outerBoundary)]),\n ...innerRings.flatMap((innerRing) => [\n BR,\n x('innerBoundaryIs', [BR, TAB, linearRing(innerRing)]),\n ]),\n ]);\n}\n\nfunction convertGeometry(geometry: Geometry): Element {\n switch (geometry.type) {\n case 'Point':\n return x('Point', [coord1(geometry.coordinates)]);\n case 'MultiPoint':\n return convertMultiPoint(geometry);\n case 'LineString':\n return x('LineString', [coord2(geometry.coordinates)]);\n case 'MultiLineString':\n return convertMultiLineString(geometry);\n case 'Polygon':\n return convertPolygon(geometry);\n case 'MultiPolygon':\n return convertMultiPolygon(geometry);\n case 'GeometryCollection':\n return x(\n 'MultiGeometry',\n geometry.geometries.flatMap((geometry) => [\n BR,\n convertGeometry(geometry),\n ])\n );\n }\n}\n"],"names":["subset","own","unsafe"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAI,CAAC;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,UAAU,IAAI,EAAE,KAAK,EAA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AAoB;AACvB,YAAA,OAAO,CAAC,CACN,eAAe,EACf,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAK;gBACxC,EAAE;gBACF,eAAe,CAAC,QAAQ,CAAC;AAC1B,aAAA,CAAC,CACH,CAAC;AACL,KAAA;AACH;;;;"}
|
umap/storage.py
CHANGED
|
@@ -32,7 +32,11 @@ class UmapManifestStaticFilesStorage(ManifestStaticFilesStorage):
|
|
|
32
32
|
'import"%(url)s"\n',
|
|
33
33
|
),
|
|
34
34
|
(
|
|
35
|
-
r"""(?P<matched>import\(["'](?P<url>.*?)["']\))""",
|
|
35
|
+
r"""(?P<matched>import\(["'](?P<url>.*?)["']\))\.then""",
|
|
36
|
+
"""import("%(url)s")""",
|
|
37
|
+
),
|
|
38
|
+
(
|
|
39
|
+
r"""(?P<matched>await import\(["'](?P<url>.*?)["']\))""",
|
|
36
40
|
"""import("%(url)s")""",
|
|
37
41
|
),
|
|
38
42
|
),
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</style>
|
|
6
6
|
|
|
7
7
|
<template id="umap-alert-template">
|
|
8
|
-
<div role="dialog" class="dark window">
|
|
8
|
+
<div role="dialog" class="dark window umap-alert">
|
|
9
9
|
<div>
|
|
10
10
|
<p role="alert"></p>
|
|
11
11
|
</div>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<umap-alert></umap-alert>
|
|
21
21
|
|
|
22
22
|
<template id="umap-alert-creation-template">
|
|
23
|
-
<div role="dialog" class="dark window">
|
|
23
|
+
<div role="dialog" class="dark window umap-alert">
|
|
24
24
|
<div>
|
|
25
25
|
<h3 role="alert"></h3>
|
|
26
26
|
{% url "login" as login_url %}
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<umap-alert-creation></umap-alert-creation>
|
|
56
56
|
|
|
57
57
|
<template id="umap-alert-conflict-template">
|
|
58
|
-
<div role="dialog" class="dark window">
|
|
58
|
+
<div role="dialog" class="dark window umap-alert">
|
|
59
59
|
<div>
|
|
60
60
|
<p role="alert"></p>
|
|
61
61
|
<div id="conflict-wrapper">
|
umap/templates/umap/css.html
CHANGED
|
@@ -28,9 +28,12 @@
|
|
|
28
28
|
<link rel="stylesheet" href="{% static 'umap/content.css' %}" />
|
|
29
29
|
<link rel="stylesheet" href="{% static 'umap/nav.css' %}" />
|
|
30
30
|
<link rel="stylesheet" href="{% static 'umap/map.css' %}" />
|
|
31
|
+
<link rel="stylesheet" href="{% static 'umap/css/slideshow.css' %}" />
|
|
32
|
+
<link rel="stylesheet" href="{% static 'umap/css/contextmenu.css' %}" />
|
|
31
33
|
<link rel="stylesheet" href="{% static 'umap/css/panel.css' %}" />
|
|
32
34
|
<link rel="stylesheet" href="{% static 'umap/css/window.css' %}" />
|
|
33
35
|
<link rel="stylesheet" href="{% static 'umap/css/tooltip.css' %}" />
|
|
34
36
|
<link rel="stylesheet" href="{% static 'umap/css/dialog.css' %}" />
|
|
35
37
|
<link rel="stylesheet" href="{% static 'umap/css/importers.css' %}" />
|
|
38
|
+
<link rel="stylesheet" href="{% static 'umap/css/tableeditor.css' %}" />
|
|
36
39
|
<link rel="stylesheet" href="{% static 'umap/theme.css' %}" />
|
umap/templates/umap/js.html
CHANGED
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
<script src="{% static 'umap/vendors/minimap/Control.MiniMap.min.js' %}"
|
|
20
20
|
defer></script>
|
|
21
21
|
<script src="{% static 'umap/vendors/csv2geojson/csv2geojson.js' %}" defer></script>
|
|
22
|
-
<script src="{% static 'umap/vendors/togeojson/togeojson.umd.js' %}" defer></script>
|
|
23
22
|
<script src="{% static 'umap/vendors/osmtogeojson/osmtogeojson.js' %}" defer></script>
|
|
24
23
|
<script src="{% static 'umap/vendors/loading/Control.Loading.js' %}" defer></script>
|
|
25
24
|
<script src="{% static 'umap/vendors/markercluster/leaflet.markercluster.js' %}"
|
|
@@ -37,9 +36,7 @@
|
|
|
37
36
|
defer></script>
|
|
38
37
|
<script src="{% static 'umap/vendors/measurable/Leaflet.Measurable.js' %}"
|
|
39
38
|
defer></script>
|
|
40
|
-
<script src="{% static 'umap/vendors/togpx/togpx.js' %}" defer></script>
|
|
41
39
|
<script src="{% static 'umap/vendors/iconlayers/iconLayers.js' %}" defer></script>
|
|
42
|
-
<script src="{% static 'umap/vendors/tokml/tokml.js' %}" defer></script>
|
|
43
40
|
<script src="{% static 'umap/vendors/locatecontrol/L.Control.Locate.min.js' %}"
|
|
44
41
|
defer></script>
|
|
45
42
|
<script src="{% static 'umap/vendors/colorbrewer/colorbrewer.js' %}" defer></script>
|
|
@@ -54,8 +51,5 @@
|
|
|
54
51
|
<script src="{% static 'umap/js/umap.datalayer.permissions.js' %}" defer></script>
|
|
55
52
|
<script src="{% static 'umap/js/umap.layer.js' %}" defer></script>
|
|
56
53
|
<script src="{% static 'umap/js/umap.controls.js' %}" defer></script>
|
|
57
|
-
<script src="{% static 'umap/js/umap.slideshow.js' %}" defer></script>
|
|
58
|
-
<script src="{% static 'umap/js/umap.tableeditor.js' %}" defer></script>
|
|
59
|
-
<script src="{% static 'umap/js/umap.share.js' %}" defer></script>
|
|
60
54
|
<script src="{% static 'umap/js/umap.js' %}" defer></script>
|
|
61
55
|
<script src="{% static 'umap/js/components/fragment.js' %}" defer></script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"highway":"tertiary","ref":"D 59a","id":"way/89506879"},"geometry":{"type":"LineString","coordinates":[[3.329911,48.442931],[3.340596,48.445685],[3.34569,48.447015],[3.348342,48.447707],[3.349625,48.448419]]},"id":"IxNjM"},{"type":"Feature","properties":{"highway":"tertiary","maxspeed":"50","ref":"D 59a","id":"way/89506883"},"geometry":{"type":"LineString","coordinates":[[3.316497,48.430407],[3.31648,48.43046],[3.316321,48.4308],[3.316171,48.431138],[3.315748,48.432219],[3.315563,48.432569],[3.315468,48.432988]]},"id":"AyNzg"},{"type":"Feature","properties":{"access":"no","bicycle":"yes","foot":"yes","highway":"unclassified","source":"cadastre-dgi-fr source : Direction Générale des Impôts - Cadastre. Mise à jour : 2012","id":"way/157803746"},"geometry":{"type":"LineString","coordinates":[[3.322811,48.445454],[3.322736,48.445251],[3.322636,48.445022],[3.322419,48.444642],[3.322057,48.444034],[3.321798,48.443691],[3.321447,48.443351],[3.321133,48.443096],[3.320785,48.442891],[3.320473,48.442753],[3.320178,48.442622],[3.319891,48.442415],[3.31883,48.44189]]},"id":"Q4NDQ"},{"type":"Feature","properties":{"highway":"track","source":"cadastre-dgi-fr source : Direction Générale des Impôts - Cadastre. Mise à jour : 2012","id":"way/157803748"},"geometry":{"type":"LineString","coordinates":[[3.318787,48.441834],[3.318546,48.441838],[3.318203,48.441806],[3.317738,48.44169],[3.317154,48.441519],[3.316836,48.441428],[3.316252,48.441317],[3.315526,48.441174]]},"id":"QwMjU"},{"type":"Feature","properties":{"access":"no","bicycle":"yes","bridge":"yes","foot":"yes","highway":"unclassified","layer":"1","source":"cadastre-dgi-fr source : Direction Générale des Impôts - Cadastre. Mise à jour : 2012","id":"way/157803749"},"geometry":{"type":"LineString","coordinates":[[3.322864,48.44574],[3.322811,48.445454]]},"id":"gyNzI"},{"type":"Feature","properties":{"access":"no","bicycle":"yes","foot":"yes","highway":"unclassified","source":"cadastre-dgi-fr source : Direction Générale des Impôts - Cadastre. Mise à jour : 2012","id":"way/157803750"},"geometry":{"type":"LineString","coordinates":[[3.333991,48.458017],[3.333441,48.458133],[3.332761,48.458267],[3.331904,48.458387],[3.331375,48.458422],[3.33056,48.458452],[3.329931,48.458456],[3.329558,48.458437],[3.329085,48.458374],[3.328322,48.458218],[3.32774,48.458094],[3.327159,48.457845],[3.326669,48.457605],[3.326137,48.4573],[3.325277,48.45666],[3.325102,48.456451],[3.324821,48.455988],[3.324534,48.455626],[3.324353,48.455379],[3.324342,48.455183],[3.324286,48.454686],[3.324155,48.453592],[3.324008,48.452772],[3.323833,48.452002],[3.323671,48.451541],[3.32349,48.451061],[3.323382,48.450657],[3.32329,48.450269],[3.323134,48.449399],[3.323056,48.449001],[3.322964,48.448774],[3.322928,48.448397],[3.322925,48.448091],[3.322992,48.447758],[3.322989,48.447443],[3.322922,48.446089],[3.322889,48.445857],[3.322864,48.44574]]},"id":"I3NDA"},{"type":"Feature","properties":{"highway":"unclassified","source":"cadastre-dgi-fr source : Direction Générale des Impôts - Cadastre. Mise à jour : 2012","id":"way/176285336"},"geometry":{"type":"LineString","coordinates":[[3.324318,48.433358],[3.326175,48.432166]]},"id":"E3MTA"},{"type":"Feature","properties":{"highway":"track","source":"cadastre-dgi-fr source : Direction Générale des Impôts - Cadastre. Mise à jour : 2012","id":"way/176985481"},"geometry":{"type":"LineString","coordinates":[[3.311888,48.439224],[3.311992,48.439127],[3.31201,48.438896],[3.312117,48.438331],[3.312466,48.437644],[3.312782,48.43733],[3.313319,48.436907],[3.313855,48.436142],[3.314322,48.435359],[3.314665,48.434828],[3.314756,48.434127],[3.314563,48.433583],[3.314064,48.4327],[3.313635,48.432049],[3.313104,48.4316],[3.312423,48.431255],[3.311688,48.431034],[3.310974,48.430956],[3.310545,48.430974],[3.310014,48.430906],[3.308888,48.430746],[3.307026,48.430636],[3.305878,48.430536],[3.304896,48.430369],[3.30385,48.430194],[3.303443,48.430112],[3.302912,48.430052],[3.302037,48.429991],[3.301463,48.429952],[3.300262,48.429756],[3.299929,48.429707],[3.298835,48.429564],[3.298169,48.429522],[3.296759,48.429411],[3.295541,48.429297],[3.295241,48.429258],[3.294693,48.429215],[3.294017,48.429205],[3.29354,48.429251],[3.292886,48.429279],[3.292376,48.429294],[3.292097,48.429279],[3.290863,48.429141],[3.290514,48.429091],[3.289425,48.428831],[3.288868,48.428699],[3.288422,48.42861],[3.287585,48.428457],[3.287269,48.428361],[3.286947,48.428297],[3.285896,48.42819],[3.284689,48.428155],[3.283374,48.428151],[3.282639,48.42814],[3.282119,48.428115],[3.281604,48.428062],[3.281041,48.427948],[3.280531,48.427841],[3.280107,48.427674],[3.279635,48.427525],[3.279061,48.42735],[3.278557,48.427112],[3.278257,48.426941],[3.277881,48.426692],[3.275145,48.425104],[3.274577,48.424773],[3.274137,48.424534],[3.273879,48.424403],[3.273531,48.424342],[3.272898,48.424253],[3.272318,48.424093],[3.271884,48.423915],[3.271063,48.423431],[3.270714,48.423185],[3.270489,48.423021],[3.270097,48.422762],[3.269727,48.42243],[3.269384,48.422],[3.269143,48.421615],[3.269122,48.421552],[3.269009,48.421206],[3.26894,48.420862],[3.268666,48.419811],[3.268592,48.419541],[3.268387,48.419139],[3.268284,48.419007],[3.268237,48.418946],[3.267943,48.418533],[3.267649,48.418259],[3.267375,48.418082],[3.267159,48.417941],[3.266757,48.417718],[3.266374,48.417559],[3.265992,48.417459],[3.265501,48.417392],[3.265157,48.417369],[3.264396,48.417359],[3.263963,48.417385],[3.263314,48.417418],[3.262437,48.417494],[3.261787,48.417518],[3.260853,48.417549],[3.260234,48.417546],[3.260029,48.417662],[3.259319,48.417556],[3.25855,48.417505],[3.25785,48.417279],[3.257406,48.417115],[3.257054,48.416915]]},"id":"c1MDg"},{"type":"Feature","properties":{"highway":"track","id":"way/204826086"},"geometry":{"type":"LineString","coordinates":[[3.282474,48.432896],[3.282699,48.432763],[3.283359,48.432419],[3.284419,48.431863],[3.285123,48.431589],[3.285648,48.431481],[3.286658,48.431336],[3.28693,48.431226],[3.287275,48.431028],[3.287506,48.430896],[3.287859,48.430734],[3.288232,48.430642]]},"id":"MyMjY"},{"type":"Feature","properties":{"highway":"unclassified","id":"way/204826117"},"geometry":{"type":"LineString","coordinates":[[3.319747,48.438464],[3.319869,48.438336],[3.320458,48.437703],[3.32229,48.43564],[3.323735,48.433961],[3.324218,48.43345],[3.324318,48.433358]]},"id":"YwNDM"},{"type":"Feature","properties":{"highway":"unclassified","id":"way/241679911"},"geometry":{"type":"LineString","coordinates":[[3.333439,48.436813],[3.333139,48.437132],[3.332689,48.43774],[3.332299,48.43841],[3.331963,48.439003],[3.331573,48.439691],[3.330788,48.441166],[3.329911,48.442931],[3.329409,48.443578],[3.328879,48.4442]]},"id":"E3ODg"},{"type":"Feature","properties":{"highway":"service","id":"way/241679912"},"geometry":{"type":"LineString","coordinates":[[3.330818,48.438632],[3.331963,48.439003]]},"id":"UyMzU"},{"type":"Feature","properties":{"highway":"tertiary","source":"cadastre-dgi-fr source : Direction Générale des Impôts - Cadastre. Mise à jour : 2014","id":"way/268144125"},"geometry":{"type":"LineString","coordinates":[[3.287003,48.435101],[3.288441,48.434837],[3.290892,48.434381],[3.292744,48.434047],[3.294245,48.433794],[3.294873,48.433733],[3.295694,48.433822],[3.296503,48.433925],[3.296906,48.434036],[3.297346,48.434222],[3.298196,48.434617],[3.300036,48.435473],[3.300413,48.435607],[3.300853,48.435765],[3.30369,48.436519],[3.30413,48.43661],[3.304591,48.436658],[3.307256,48.436777],[3.308427,48.43692],[3.308562,48.436937],[3.309842,48.437124],[3.310257,48.437238],[3.310362,48.437314],[3.310392,48.437432],[3.310369,48.437851],[3.310448,48.438072],[3.310738,48.438329],[3.311215,48.438543],[3.31157,48.438751],[3.311804,48.439],[3.311888,48.439224]]},"id":"A3MDI"},{"type":"Feature","properties":{"grande_circulation":"yes","highway":"secondary","lanes":"2","lit":"no","maxspeed":"90","oneway":"no","ref":"D 411","source:maxspeed":"sign","id":"way/323986800"},"geometry":{"type":"LineString","coordinates":[[3.316497,48.430407],[3.316729,48.430502],[3.320189,48.431808],[3.321147,48.43217],[3.323495,48.433056],[3.324318,48.433358],[3.333439,48.436813],[3.348216,48.44241],[3.351505,48.44364]]},"id":"E5NzQ"},{"type":"Feature","properties":{"highway":"track","id":"way/486799707"},"geometry":{"type":"LineString","coordinates":[[3.306142,48.450149],[3.306711,48.449253],[3.307124,48.448231],[3.307354,48.447626],[3.307655,48.444976],[3.307998,48.444694],[3.30854,48.44363],[3.308685,48.44315],[3.30883,48.44252],[3.309098,48.441883],[3.309742,48.440018],[3.309779,48.439225],[3.310117,48.438111],[3.310369,48.437851]]},"id":"Q0Njc"},{"type":"Feature","properties":{"highway":"track","id":"way/486799708"},"geometry":{"type":"LineString","coordinates":[[3.302872,48.440398],[3.302103,48.440901],[3.301158,48.441292],[3.300708,48.441403],[3.300037,48.441417],[3.29912,48.441456],[3.29574,48.441575],[3.294316,48.44162],[3.293999,48.441599],[3.293573,48.441443]]},"id":"Q0NTk"},{"type":"Feature","properties":{"highway":"track","id":"way/486799709"},"geometry":{"type":"LineString","coordinates":[[3.308427,48.43692],[3.308025,48.437068],[3.306686,48.437132],[3.305361,48.437476],[3.304613,48.437931],[3.304079,48.438495],[3.303124,48.44002],[3.302872,48.440398],[3.302382,48.441132],[3.300665,48.443616],[3.300359,48.444057]]},"id":"IwNDY"},{"type":"Feature","properties":{"highway":"track","id":"way/486799710"},"geometry":{"type":"LineString","coordinates":[[3.320189,48.431808],[3.319082,48.433929],[3.318355,48.435437],[3.318259,48.435636]]},"id":"IzMTQ"},{"type":"Feature","properties":{"highway":"track","tracktype":"grade5","id":"way/500368729"},"geometry":{"type":"LineString","coordinates":[[3.292744,48.434047],[3.29338,48.434203],[3.294332,48.435848],[3.294755,48.436133],[3.294926,48.436656],[3.294955,48.437167],[3.295002,48.437572],[3.294791,48.438805],[3.295137,48.439058],[3.293609,48.441277],[3.293573,48.441443],[3.293268,48.442833],[3.294338,48.444194],[3.294267,48.444346],[3.292445,48.44479]]},"id":"I4NTc"},{"type":"Feature","properties":{"highway":"tertiary","ref":"D 59a","id":"way/642268287"},"geometry":{"type":"LineString","coordinates":[[3.32006,48.439401],[3.320767,48.439803],[3.321423,48.44017],[3.321721,48.440302],[3.322576,48.440483],[3.323881,48.440756],[3.325771,48.441501]]},"id":"AxNTI"},{"type":"Feature","properties":{"highway":"track","id":"way/696965030"},"geometry":{"type":"LineString","coordinates":[[3.321229,48.432107],[3.325698,48.429201]]},"id":"Q2NTc"},{"type":"Feature","properties":{"highway":"track","id":"way/696965031"},"geometry":{"type":"LineString","coordinates":[[3.321147,48.43217],[3.321229,48.432107],[3.318019,48.430863],[3.317002,48.430429],[3.316664,48.430366],[3.316553,48.430279],[3.316195,48.430172],[3.316543,48.430005],[3.317442,48.429489],[3.322388,48.426709],[3.321626,48.426453],[3.323568,48.425378],[3.32521,48.424434],[3.327954,48.422909],[3.328385,48.422629],[3.328679,48.42214],[3.328817,48.422036],[3.328959,48.421991],[3.329222,48.421987],[3.329461,48.422035],[3.329944,48.422211],[3.330247,48.422394],[3.329673,48.422761],[3.329276,48.422998],[3.329201,48.423195]]},"id":"gwMTA"},{"type":"Feature","properties":{"highway":"unclassified","source":"cadastre-dgi-fr source : Direction Générale des Impôts - Cadastre. Mise à jour : 2012","id":"way/1102515500"},"geometry":{"type":"LineString","coordinates":[[3.31883,48.44189],[3.318787,48.441834],[3.318802,48.441544],[3.318843,48.441286]]},"id":"YxMDE"},{"type":"Feature","properties":{"highway":"service","name":"Chemin des Pâtures","id":"way/486799705"},"geometry":{"type":"LineString","coordinates":[[3.319559,48.441297],[3.320371,48.441362],[3.321178,48.44146]]},"id":"MwMDk"},{"type":"Feature","properties":{"highway":"track","name":"Chemin du Bord de Seine","id":"way/156280075"},"geometry":{"type":"LineString","coordinates":[[3.322529,48.458698],[3.322536,48.45859],[3.322485,48.458054],[3.322449,48.4578],[3.322509,48.456769],[3.322697,48.455891],[3.323012,48.455006],[3.323064,48.454708],[3.323018,48.454219],[3.322891,48.453738],[3.322757,48.453191],[3.322551,48.45238],[3.322375,48.451853],[3.32206,48.451346],[3.321738,48.450893],[3.321581,48.450725],[3.321596,48.450592],[3.321399,48.450299],[3.321318,48.450245],[3.32125,48.450108],[3.321006,48.44971],[3.320781,48.449165],[3.320821,48.448622],[3.321127,48.447952],[3.32147,48.447189],[3.321544,48.446906],[3.32163,48.446443],[3.321606,48.44605],[3.321538,48.445738],[3.321414,48.445541],[3.321241,48.445004],[3.320932,48.4446],[3.320583,48.444125],[3.320314,48.44386],[3.31991,48.443591],[3.319189,48.443139],[3.318877,48.442977],[3.318183,48.44253],[3.31779,48.44237],[3.315977,48.441985],[3.314204,48.441883],[3.313497,48.441782],[3.31301,48.441592],[3.312678,48.441382],[3.31243,48.441356]]},"id":"I0MTA"},{"type":"Feature","properties":{"highway":"tertiary","maxspeed":"50","name":"Grande Rue","ref":"D 59a","id":"way/366050260"},"geometry":{"type":"LineString","coordinates":[[3.315468,48.432988],[3.315486,48.43315],[3.315572,48.433443],[3.315842,48.434111],[3.316294,48.435411],[3.31651,48.436015],[3.316641,48.436237],[3.316917,48.436554],[3.317196,48.436836],[3.317327,48.437165],[3.317374,48.437384],[3.317411,48.437728],[3.317336,48.438207],[3.317296,48.438516],[3.317291,48.438644],[3.317372,48.438761],[3.317754,48.438975],[3.318361,48.439276],[3.318541,48.439309],[3.319384,48.439309],[3.32006,48.439401]]},"id":"M4ODI"},{"type":"Feature","properties":{"highway":"tertiary","name":"Route de Noyen","ref":"D 59a","id":"way/642268286"},"geometry":{"type":"LineString","coordinates":[[3.325771,48.441501],[3.327689,48.442227],[3.328709,48.442568],[3.329911,48.442931]]},"id":"EwMTk"},{"type":"Feature","properties":{"highway":"residential","name":"Rue de Bombelles","id":"way/204826103"},"geometry":{"type":"LineString","coordinates":[[3.31836,48.438256],[3.318111,48.438262],[3.31777,48.438243],[3.317336,48.438207]]},"id":"YxNjQ"},{"type":"Feature","properties":{"highway":"residential","name":"Rue de Bombelles","id":"way/204826116"},"geometry":{"type":"LineString","coordinates":[[3.318381,48.438204],[3.318584,48.438228],[3.319747,48.438464],[3.320278,48.438561],[3.320366,48.438647],[3.320304,48.438808],[3.32006,48.439401]]},"id":"A5NDQ"},{"type":"Feature","properties":{"highway":"residential","name":"Rue de l'Est","id":"way/204826115"},"geometry":{"type":"LineString","coordinates":[[3.32006,48.439401],[3.320009,48.439588],[3.319715,48.440199],[3.319601,48.440519],[3.319562,48.44085],[3.319559,48.441297],[3.318843,48.441286]]},"id":"AwNjM"},{"type":"Feature","properties":{"highway":"residential","name":"Rue du Bac","source":"cadastre-dgi-fr source : Direction Générale des Impôts - Cadastre. Mise à jour : 2012","id":"way/157803747"},"geometry":{"type":"LineString","coordinates":[[3.318843,48.441286],[3.318869,48.441111],[3.318948,48.440362],[3.318931,48.440234],[3.318631,48.439937],[3.318625,48.439737],[3.318591,48.439531],[3.318541,48.439309]]},"id":"QyNDk"},{"type":"Feature","properties":{"highway":"residential","name":"Rue du Tertre","id":"way/204826120"},"geometry":{"type":"LineString","coordinates":[[3.317754,48.438975],[3.317848,48.438879],[3.31836,48.438256],[3.318381,48.438204],[3.318454,48.438021],[3.318623,48.437701],[3.318759,48.437439],[3.318778,48.437295],[3.318759,48.437176],[3.318353,48.435991],[3.318259,48.435636]]},"id":"M4NjA"}],"_umap_options":{"displayOnLoad":true,"inCaption":true,"browsable":true,"editMode":"advanced","name":"Grisy-sur-Seine","remoteData":{},"id":"769b2bb0-920d-4531-8055-dd198a33456a","permissions":{"edit_status":0},"type":"Categorized","weight":3,"opacity":0.9,"categorized":{"property":"highway"},"popupContentTemplate":"# {name}\n{highway}"}}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 0.6,
|
|
3
|
+
"generator": "Overpass API 0.7.62.1 084b4234",
|
|
4
|
+
"osm3s": {
|
|
5
|
+
"timestamp_osm_base": "2024-07-09T21:12:25Z",
|
|
6
|
+
"copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL."
|
|
7
|
+
},
|
|
8
|
+
"elements": [
|
|
9
|
+
|
|
10
|
+
{
|
|
11
|
+
"type": "relation",
|
|
12
|
+
"id": 15612202,
|
|
13
|
+
"bounds": {
|
|
14
|
+
"minlat": 44.4954890,
|
|
15
|
+
"minlon": 4.4694996,
|
|
16
|
+
"maxlat": 44.5008991,
|
|
17
|
+
"maxlon": 4.4837427
|
|
18
|
+
},
|
|
19
|
+
"members": [
|
|
20
|
+
{
|
|
21
|
+
"type": "way",
|
|
22
|
+
"ref": 923993108,
|
|
23
|
+
"role": "",
|
|
24
|
+
"geometry": [
|
|
25
|
+
{ "lat": 44.5008991, "lon": 4.4837427 },
|
|
26
|
+
{ "lat": 44.5005842, "lon": 4.4829595 }
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "way",
|
|
31
|
+
"ref": 152053540,
|
|
32
|
+
"role": "",
|
|
33
|
+
"geometry": [
|
|
34
|
+
{ "lat": 44.5005842, "lon": 4.4829595 },
|
|
35
|
+
{ "lat": 44.5004511, "lon": 4.4825203 },
|
|
36
|
+
{ "lat": 44.5003881, "lon": 4.4823967 },
|
|
37
|
+
{ "lat": 44.5003271, "lon": 4.4823127 }
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "way",
|
|
42
|
+
"ref": 152053454,
|
|
43
|
+
"role": "",
|
|
44
|
+
"geometry": [
|
|
45
|
+
{ "lat": 44.5003271, "lon": 4.4823127 },
|
|
46
|
+
{ "lat": 44.5000601, "lon": 4.4819984 }
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "way",
|
|
51
|
+
"ref": 1154990810,
|
|
52
|
+
"role": "",
|
|
53
|
+
"geometry": [
|
|
54
|
+
{ "lat": 44.4962236, "lon": 4.4723158 },
|
|
55
|
+
{ "lat": 44.4962813, "lon": 4.4723213 },
|
|
56
|
+
{ "lat": 44.4965874, "lon": 4.4721067 },
|
|
57
|
+
{ "lat": 44.4966180, "lon": 4.4720209 },
|
|
58
|
+
{ "lat": 44.4966410, "lon": 4.4718492 },
|
|
59
|
+
{ "lat": 44.4967328, "lon": 4.4717205 },
|
|
60
|
+
{ "lat": 44.4970542, "lon": 4.4715917 },
|
|
61
|
+
{ "lat": 44.4974522, "lon": 4.4713986 },
|
|
62
|
+
{ "lat": 44.4978195, "lon": 4.4710231 },
|
|
63
|
+
{ "lat": 44.4980338, "lon": 4.4707442 },
|
|
64
|
+
{ "lat": 44.4981945, "lon": 4.4704330 },
|
|
65
|
+
{ "lat": 44.4983016, "lon": 4.4701434 },
|
|
66
|
+
{ "lat": 44.4985006, "lon": 4.4697249 },
|
|
67
|
+
{ "lat": 44.4986383, "lon": 4.4695747 },
|
|
68
|
+
{ "lat": 44.4989138, "lon": 4.4694996 }
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "way",
|
|
73
|
+
"ref": 152053472,
|
|
74
|
+
"role": "",
|
|
75
|
+
"geometry": [
|
|
76
|
+
{ "lat": 44.5000601, "lon": 4.4819984 },
|
|
77
|
+
{ "lat": 44.5000206, "lon": 4.4819429 },
|
|
78
|
+
{ "lat": 44.4998592, "lon": 4.4817717 },
|
|
79
|
+
{ "lat": 44.4996283, "lon": 4.4814022 },
|
|
80
|
+
{ "lat": 44.4995821, "lon": 4.4813051 },
|
|
81
|
+
{ "lat": 44.4995458, "lon": 4.4811896 },
|
|
82
|
+
{ "lat": 44.4995458, "lon": 4.4811110 },
|
|
83
|
+
{ "lat": 44.4997535, "lon": 4.4799509 },
|
|
84
|
+
{ "lat": 44.4997865, "lon": 4.4798677 },
|
|
85
|
+
{ "lat": 44.4997766, "lon": 4.4798030 },
|
|
86
|
+
{ "lat": 44.4997370, "lon": 4.4797752 },
|
|
87
|
+
{ "lat": 44.4997008, "lon": 4.4797984 },
|
|
88
|
+
{ "lat": 44.4991997, "lon": 4.4811711 },
|
|
89
|
+
{ "lat": 44.4991601, "lon": 4.4812173 },
|
|
90
|
+
{ "lat": 44.4991074, "lon": 4.4812450 },
|
|
91
|
+
{ "lat": 44.4990612, "lon": 4.4812265 },
|
|
92
|
+
{ "lat": 44.4988799, "lon": 4.4811017 },
|
|
93
|
+
{ "lat": 44.4984513, "lon": 4.4806719 },
|
|
94
|
+
{ "lat": 44.4967173, "lon": 4.4791004 },
|
|
95
|
+
{ "lat": 44.4962100, "lon": 4.4785085 },
|
|
96
|
+
{ "lat": 44.4961073, "lon": 4.4783887 },
|
|
97
|
+
{ "lat": 44.4959557, "lon": 4.4780559 },
|
|
98
|
+
{ "lat": 44.4959290, "lon": 4.4778837 },
|
|
99
|
+
{ "lat": 44.4957377, "lon": 4.4775351 },
|
|
100
|
+
{ "lat": 44.4956229, "lon": 4.4772561 },
|
|
101
|
+
{ "lat": 44.4955081, "lon": 4.4768269 },
|
|
102
|
+
{ "lat": 44.4954890, "lon": 4.4764568 },
|
|
103
|
+
{ "lat": 44.4955540, "lon": 4.4759472 },
|
|
104
|
+
{ "lat": 44.4955923, "lon": 4.4755502 },
|
|
105
|
+
{ "lat": 44.4957071, "lon": 4.4750406 },
|
|
106
|
+
{ "lat": 44.4957721, "lon": 4.4746758 },
|
|
107
|
+
{ "lat": 44.4957874, "lon": 4.4741662 },
|
|
108
|
+
{ "lat": 44.4957683, "lon": 4.4726856 },
|
|
109
|
+
{ "lat": 44.4958219, "lon": 4.4725140 },
|
|
110
|
+
{ "lat": 44.4960783, "lon": 4.4723101 },
|
|
111
|
+
{ "lat": 44.4962084, "lon": 4.4722887 },
|
|
112
|
+
{ "lat": 44.4962236, "lon": 4.4723158 }
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"tags": {
|
|
117
|
+
"ascent": "70",
|
|
118
|
+
"descent": "5",
|
|
119
|
+
"distance": "1.9",
|
|
120
|
+
"name": "Saint-Maurice d'Ibie - Petit Montagu",
|
|
121
|
+
"network": "lwn",
|
|
122
|
+
"network:type": "node_network",
|
|
123
|
+
"route": "hiking",
|
|
124
|
+
"survey:date": "2023-03-13",
|
|
125
|
+
"type": "route"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
]
|
|
130
|
+
}
|
|
@@ -22,10 +22,17 @@ def set_timeout(context):
|
|
|
22
22
|
|
|
23
23
|
@pytest.fixture(autouse=True)
|
|
24
24
|
def mock_osm_tiles(page):
|
|
25
|
-
if not bool(os.environ.get("
|
|
25
|
+
if not bool(os.environ.get("PWDEBUG", False)):
|
|
26
26
|
page.route("*/**/osmfr/**", lambda route: route.fulfill())
|
|
27
27
|
|
|
28
28
|
|
|
29
|
+
@pytest.fixture
|
|
30
|
+
def page(context):
|
|
31
|
+
page = context.new_page()
|
|
32
|
+
page.on("console", lambda msg: print(msg.text) if msg.type != "warning" else None)
|
|
33
|
+
return page
|
|
34
|
+
|
|
35
|
+
|
|
29
36
|
@pytest.fixture
|
|
30
37
|
def login(context, settings, live_server):
|
|
31
38
|
def do_login(user):
|
|
@@ -320,10 +320,11 @@ def test_should_redraw_list_on_feature_delete(live_server, openmap, page, bootst
|
|
|
320
320
|
page.get_by_role("button", name="Edit").click()
|
|
321
321
|
buttons = page.locator(".umap-browser .datalayer li .icon-delete")
|
|
322
322
|
expect(buttons).to_have_count(3)
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
buttons.first.click()
|
|
324
|
+
page.locator("dialog").get_by_role("button", name="OK").click()
|
|
325
325
|
expect(buttons).to_have_count(2)
|
|
326
326
|
page.get_by_role("button", name="Cancel edits").click()
|
|
327
|
+
page.locator("dialog").get_by_role("button", name="OK").click()
|
|
327
328
|
expect(buttons).to_have_count(3)
|
|
328
329
|
|
|
329
330
|
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
import pytest
|
|
5
|
+
from playwright.sync_api import expect
|
|
6
|
+
|
|
7
|
+
from ..base import DataLayerFactory
|
|
8
|
+
|
|
9
|
+
pytestmark = pytest.mark.django_db
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def test_basic_categorized_map_with_default_color(map, live_server, page):
|
|
13
|
+
path = Path(__file__).parent.parent / "fixtures/categorized_highway.geojson"
|
|
14
|
+
data = json.loads(path.read_text())
|
|
15
|
+
DataLayerFactory(data=data, map=map)
|
|
16
|
+
page.goto(f"{live_server.url}{map.get_absolute_url()}#13/48.4378/3.3043")
|
|
17
|
+
# residential
|
|
18
|
+
expect(page.locator("path[stroke='#7fc97f']")).to_have_count(5)
|
|
19
|
+
# secondary
|
|
20
|
+
expect(page.locator("path[stroke='#beaed4']")).to_have_count(1)
|
|
21
|
+
# service
|
|
22
|
+
expect(page.locator("path[stroke='#fdc086']")).to_have_count(2)
|
|
23
|
+
# tertiary
|
|
24
|
+
expect(page.locator("path[stroke='#ffff99']")).to_have_count(6)
|
|
25
|
+
# track
|
|
26
|
+
expect(page.locator("path[stroke='#386cb0']")).to_have_count(11)
|
|
27
|
+
# unclassified
|
|
28
|
+
expect(page.locator("path[stroke='#f0027f']")).to_have_count(7)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def test_basic_categorized_map_with_custom_brewer(openmap, live_server, page):
|
|
32
|
+
path = Path(__file__).parent.parent / "fixtures/categorized_highway.geojson"
|
|
33
|
+
data = json.loads(path.read_text())
|
|
34
|
+
|
|
35
|
+
# Change brewer at load
|
|
36
|
+
data["_umap_options"]["categorized"]["brewer"] = "Spectral"
|
|
37
|
+
DataLayerFactory(data=data, map=openmap)
|
|
38
|
+
|
|
39
|
+
page.goto(f"{live_server.url}{openmap.get_absolute_url()}#13/48.4378/3.3043")
|
|
40
|
+
# residential
|
|
41
|
+
expect(page.locator("path[stroke='#d53e4f']")).to_have_count(5)
|
|
42
|
+
# secondary
|
|
43
|
+
expect(page.locator("path[stroke='#fc8d59']")).to_have_count(1)
|
|
44
|
+
# service
|
|
45
|
+
expect(page.locator("path[stroke='#fee08b']")).to_have_count(2)
|
|
46
|
+
# tertiary
|
|
47
|
+
expect(page.locator("path[stroke='#e6f598']")).to_have_count(6)
|
|
48
|
+
# track
|
|
49
|
+
expect(page.locator("path[stroke='#99d594']")).to_have_count(11)
|
|
50
|
+
# unclassified
|
|
51
|
+
expect(page.locator("path[stroke='#3288bd']")).to_have_count(7)
|
|
52
|
+
|
|
53
|
+
# Now change brewer from UI
|
|
54
|
+
page.get_by_role("button", name="Edit").click()
|
|
55
|
+
page.get_by_role("link", name="Manage layers").click()
|
|
56
|
+
page.locator(".panel").get_by_title("Edit", exact=True).click()
|
|
57
|
+
page.get_by_text("Categorized: settings").click()
|
|
58
|
+
page.locator('select[name="brewer"]').select_option("Paired")
|
|
59
|
+
|
|
60
|
+
# residential
|
|
61
|
+
expect(page.locator("path[stroke='#a6cee3']")).to_have_count(5)
|
|
62
|
+
# secondary
|
|
63
|
+
expect(page.locator("path[stroke='#1f78b4']")).to_have_count(1)
|
|
64
|
+
# service
|
|
65
|
+
expect(page.locator("path[stroke='#b2df8a']")).to_have_count(2)
|
|
66
|
+
# tertiary
|
|
67
|
+
expect(page.locator("path[stroke='#33a02c']")).to_have_count(6)
|
|
68
|
+
# track
|
|
69
|
+
expect(page.locator("path[stroke='#fb9a99']")).to_have_count(11)
|
|
70
|
+
# unclassified
|
|
71
|
+
expect(page.locator("path[stroke='#e31a1c']")).to_have_count(7)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def test_basic_categorized_map_with_custom_categories(openmap, live_server, page):
|
|
75
|
+
path = Path(__file__).parent.parent / "fixtures/categorized_highway.geojson"
|
|
76
|
+
data = json.loads(path.read_text())
|
|
77
|
+
|
|
78
|
+
# Change categories at load
|
|
79
|
+
data["_umap_options"]["categorized"]["categories"] = (
|
|
80
|
+
"unclassified,track,service,residential,tertiary,secondary"
|
|
81
|
+
)
|
|
82
|
+
data["_umap_options"]["categorized"]["mode"] = "manual"
|
|
83
|
+
DataLayerFactory(data=data, map=openmap)
|
|
84
|
+
|
|
85
|
+
page.goto(f"{live_server.url}{openmap.get_absolute_url()}#13/48.4378/3.3043")
|
|
86
|
+
|
|
87
|
+
# unclassified
|
|
88
|
+
expect(page.locator("path[stroke='#7fc97f']")).to_have_count(7)
|
|
89
|
+
# track
|
|
90
|
+
expect(page.locator("path[stroke='#beaed4']")).to_have_count(11)
|
|
91
|
+
# service
|
|
92
|
+
expect(page.locator("path[stroke='#fdc086']")).to_have_count(2)
|
|
93
|
+
# residential
|
|
94
|
+
expect(page.locator("path[stroke='#ffff99']")).to_have_count(5)
|
|
95
|
+
# tertiary
|
|
96
|
+
expect(page.locator("path[stroke='#386cb0']")).to_have_count(6)
|
|
97
|
+
# secondary
|
|
98
|
+
expect(page.locator("path[stroke='#f0027f']")).to_have_count(1)
|
|
99
|
+
|
|
100
|
+
# Now change categories from UI
|
|
101
|
+
page.get_by_role("button", name="Edit").click()
|
|
102
|
+
page.get_by_role("link", name="Manage layers").click()
|
|
103
|
+
page.locator(".panel").get_by_title("Edit", exact=True).click()
|
|
104
|
+
page.get_by_text("Categorized: settings").click()
|
|
105
|
+
page.locator('input[name="categories"]').fill(
|
|
106
|
+
"secondary,tertiary,residential,service,track,unclassified"
|
|
107
|
+
)
|
|
108
|
+
page.locator('input[name="categories"]').blur()
|
|
109
|
+
|
|
110
|
+
# secondary
|
|
111
|
+
expect(page.locator("path[stroke='#7fc97f']")).to_have_count(1)
|
|
112
|
+
# tertiary
|
|
113
|
+
expect(page.locator("path[stroke='#beaed4']")).to_have_count(6)
|
|
114
|
+
# residential
|
|
115
|
+
expect(page.locator("path[stroke='#fdc086']")).to_have_count(5)
|
|
116
|
+
# service
|
|
117
|
+
expect(page.locator("path[stroke='#ffff99']")).to_have_count(2)
|
|
118
|
+
# track
|
|
119
|
+
expect(page.locator("path[stroke='#386cb0']")).to_have_count(11)
|
|
120
|
+
# unclassified
|
|
121
|
+
expect(page.locator("path[stroke='#f0027f']")).to_have_count(7)
|
|
122
|
+
|
|
123
|
+
# Now go back to automatic categories
|
|
124
|
+
page.get_by_role("button", name="Edit").click()
|
|
125
|
+
page.get_by_role("link", name="Manage layers").click()
|
|
126
|
+
page.locator(".panel").get_by_title("Edit", exact=True).click()
|
|
127
|
+
page.get_by_text("Categorized: settings").click()
|
|
128
|
+
page.get_by_text("Alphabetical").click()
|
|
129
|
+
|
|
130
|
+
# residential
|
|
131
|
+
expect(page.locator("path[stroke='#7fc97f']")).to_have_count(5)
|
|
132
|
+
# secondary
|
|
133
|
+
expect(page.locator("path[stroke='#beaed4']")).to_have_count(1)
|
|
134
|
+
# service
|
|
135
|
+
expect(page.locator("path[stroke='#fdc086']")).to_have_count(2)
|
|
136
|
+
# tertiary
|
|
137
|
+
expect(page.locator("path[stroke='#ffff99']")).to_have_count(6)
|
|
138
|
+
# track
|
|
139
|
+
expect(page.locator("path[stroke='#386cb0']")).to_have_count(11)
|
|
140
|
+
# unclassified
|
|
141
|
+
expect(page.locator("path[stroke='#f0027f']")).to_have_count(7)
|
|
@@ -199,3 +199,24 @@ def test_can_deactive_rule_from_list(live_server, page, openmap):
|
|
|
199
199
|
page.get_by_role("button", name="Show/hide layer").click()
|
|
200
200
|
colors = getColors(markers)
|
|
201
201
|
assert colors.count("rgb(240, 248, 255)") == 2
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
def test_autocomplete_datalist(live_server, page, openmap):
|
|
205
|
+
DataLayerFactory(map=openmap, data=DATALAYER_DATA1)
|
|
206
|
+
page.goto(f"{live_server.url}{openmap.get_absolute_url()}?edit#6/48.948/1.670")
|
|
207
|
+
page.get_by_role("link", name="Map advanced properties").click()
|
|
208
|
+
page.locator("summary").filter(has_text="Conditional style rules").click()
|
|
209
|
+
page.get_by_role("button", name="Add rule").click()
|
|
210
|
+
panel = page.locator(".panel.right.on")
|
|
211
|
+
datalist = panel.locator(".umap-field-condition datalist option")
|
|
212
|
+
expect(datalist).to_have_count(5)
|
|
213
|
+
values = {option.inner_text() for option in datalist.all()}
|
|
214
|
+
assert values == {"myboolean", "mytype", "mynumber", "mydate", "name"}
|
|
215
|
+
page.get_by_placeholder("key=value or key!=value").fill("mytype")
|
|
216
|
+
expect(datalist).to_have_count(4)
|
|
217
|
+
values = {option.inner_text() for option in datalist.all()}
|
|
218
|
+
assert values == {"mytype=", "mytype!=", "mytype>", "mytype<"}
|
|
219
|
+
page.get_by_placeholder("key=value or key!=value").fill("mytype=")
|
|
220
|
+
expect(datalist).to_have_count(2)
|
|
221
|
+
values = {option.inner_text() for option in datalist.all()}
|
|
222
|
+
assert values == {"mytype=even", "mytype=odd"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import json
|
|
2
|
+
import re
|
|
2
3
|
|
|
3
4
|
import pytest
|
|
4
5
|
from django.core.files.base import ContentFile
|
|
@@ -41,13 +42,15 @@ def test_should_honour_fromZoom(live_server, map, datalayer, page):
|
|
|
41
42
|
markers = page.locator(".leaflet-marker-icon")
|
|
42
43
|
expect(markers).to_be_hidden()
|
|
43
44
|
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.55/14.68")
|
|
44
|
-
page.
|
|
45
|
+
expect(page).to_have_url(re.compile(r".*#6/48\..+/14\..+"))
|
|
45
46
|
expect(markers).to_be_visible()
|
|
46
47
|
page.get_by_label("Zoom out").click()
|
|
47
48
|
expect(markers).to_be_hidden()
|
|
48
49
|
page.get_by_label("Zoom in").click()
|
|
50
|
+
expect(page).to_have_url(re.compile(r".*#6/48\..+/14\..+"))
|
|
49
51
|
expect(markers).to_be_visible()
|
|
50
52
|
page.get_by_label("Zoom in").click()
|
|
53
|
+
expect(page).to_have_url(re.compile(r".*#7/48\..+/14\..+"))
|
|
51
54
|
expect(markers).to_be_visible()
|
|
52
55
|
|
|
53
56
|
|
|
@@ -57,15 +60,17 @@ def test_should_honour_toZoom(live_server, map, datalayer, page):
|
|
|
57
60
|
markers = page.locator(".leaflet-marker-icon")
|
|
58
61
|
expect(markers).to_be_hidden()
|
|
59
62
|
page.goto(f"{live_server.url}{map.get_absolute_url()}#6/48.55/14.68")
|
|
63
|
+
expect(page).to_have_url(re.compile(r".*#6/48\..+/14\..+"))
|
|
60
64
|
expect(markers).to_be_visible()
|
|
61
65
|
page.get_by_label("Zoom out").click()
|
|
66
|
+
expect(page).to_have_url(re.compile(r".*#5/48\..+/14\..+"))
|
|
62
67
|
expect(markers).to_be_visible()
|
|
63
68
|
page.get_by_label("Zoom in").click()
|
|
69
|
+
expect(page).to_have_url(re.compile(r".*#6/48\..+/14\..+"))
|
|
64
70
|
expect(markers).to_be_visible()
|
|
65
71
|
page.get_by_label("Zoom in").click()
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
# expect(markers).to_be_hidden()
|
|
72
|
+
expect(page).to_have_url(re.compile(r".*#7/48\..+/14\..+"))
|
|
73
|
+
expect(markers).to_be_hidden()
|
|
69
74
|
|
|
70
75
|
|
|
71
76
|
def test_should_honour_color_variable(live_server, map, page):
|
|
@@ -67,6 +67,7 @@ def test_cancel_deleting_datalayer_should_restore(
|
|
|
67
67
|
expect(page.get_by_text("test datalayer")).to_be_hidden()
|
|
68
68
|
page.once("dialog", lambda dialog: dialog.accept())
|
|
69
69
|
page.get_by_role("button", name="Cancel edits").click()
|
|
70
|
+
page.locator("dialog").get_by_role("button", name="OK").click()
|
|
70
71
|
expect(markers).to_have_count(1)
|
|
71
72
|
expect(page.locator(".umap-browser").get_by_text("test datalayer")).to_be_visible()
|
|
72
73
|
|