-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for pasting GeoJSON links #996
base: main
Are you sure you want to change the base?
Conversation
src/mapml/utils/Util.js
Outdated
try { | ||
mapEl.geojson2mapml(JSON.parse(textContent)); | ||
} catch { | ||
console.log('Invalid link!'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think thIS error message should be more along the lines of "Error parsing GeoJSON from:" + URL . It can be hard to figure out what's gone wrong, but if we say what we were trying to do, sometimes it makes it a bit easier to understand.
src/mapml/utils/Util.js
Outdated
mapEl.removeChild(mapEl.lastChild); | ||
} | ||
// garbage collect it | ||
l = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this is necessary, since the let for l scopes it to this block. It should get collected after the block closes.
05bc425
to
bdf86e6
Compare
fixes issue #992