aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/dumbymap.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/dumbymap.mjs')
-rw-r--r--src/dumbymap.mjs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/dumbymap.mjs b/src/dumbymap.mjs
index 55d29d3..cbd44b2 100644
--- a/src/dumbymap.mjs
+++ b/src/dumbymap.mjs
@@ -241,10 +241,10 @@ export const generateMaps = (container, {
241 register(proj4) 241 register(proj4)
242 fromEPSGCode(crs).then(() => resolve()) 242 fromEPSGCode(crs).then(() => resolve())
243 }) 243 })
244 const addGeoSchemeByText = new Promise(resolve => { 244 const addGeoSchemeByText = (async () => {
245 const coordPatterns = /(-?\d+\.?\d*)([,\x2F\uFF0C])(-?\d+\.?\d*)/ 245 const coordPatterns = /(-?\d+\.?\d*)([,\x2F\uFF0C])(-?\d+\.?\d*)/
246 const re = new RegExp(coordPatterns, 'g') 246 const re = new RegExp(coordPatterns, 'g')
247 htmlHolder.querySelectorAll('p') 247 htmlHolder.querySelectorAll('.dumby-block')
248 .forEach(p => { 248 .forEach(p => {
249 replaceTextNodes(p, re, match => { 249 replaceTextNodes(p, re, match => {
250 const a = document.createElement('a') 250 const a = document.createElement('a')
@@ -253,8 +253,7 @@ export const generateMaps = (container, {
253 return a 253 return a
254 }) 254 })
255 }) 255 })
256 resolve() 256 })()
257 })
258 257
259 Promise.all([setCRS, addGeoSchemeByText]).then(() => { 258 Promise.all([setCRS, addGeoSchemeByText]).then(() => {
260 Array.from(container.querySelectorAll(geoLinkSelector)) 259 Array.from(container.querySelectorAll(geoLinkSelector))