@trailstash/ultra 3.1.1 → 3.1.2
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.
package/components/ultra-ide.js
CHANGED
|
@@ -213,7 +213,10 @@ export class UltraIDE extends HTMLElement {
|
|
|
213
213
|
};
|
|
214
214
|
Object.assign(this.refs.mapLibre, {
|
|
215
215
|
...pick(settings, UltraMap.RUNTIME_SETTINGS),
|
|
216
|
-
mapStyle: setBaseStyle(
|
|
216
|
+
mapStyle: setBaseStyle(
|
|
217
|
+
settings.mapStyle,
|
|
218
|
+
this.settings.mapStyle || UltraMap.defaults.mapStyle,
|
|
219
|
+
),
|
|
217
220
|
});
|
|
218
221
|
|
|
219
222
|
this.refs.downloadButton.data = null;
|
|
@@ -33,6 +33,13 @@ const overpassQLRegexes = [
|
|
|
33
33
|
/out( geom| center| skel)?;/,
|
|
34
34
|
];
|
|
35
35
|
function detect(query) {
|
|
36
|
+
const doc = new window.DOMParser().parseFromString(query, "text/xml");
|
|
37
|
+
if (
|
|
38
|
+
!doc.querySelector("parsererror") &&
|
|
39
|
+
Array.from(doc.childNodes).some((x) => x.nodeName === "osm-script")
|
|
40
|
+
) {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
36
43
|
for (const re of overpassQLRegexes) {
|
|
37
44
|
if (query.match(re)) {
|
|
38
45
|
return query;
|
package/package.json
CHANGED