-
Notifications
You must be signed in to change notification settings - Fork 86
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
Import KML: Manage Empty geometry import error #4080
Conversation
1cb4a6c
to
dfd131c
Compare
} | ||
// Look if the extent is valid (and so at least one geometry) | ||
if (dataSource.extent[0] === Infinity) { | ||
console.error('The file contains no geometry'); |
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.
do we want to keep this console.error
?
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.
Not specially, There is already a warning to the user that says "bad file".
Should I remove it ?
return; | ||
} | ||
// Look if the extent is valid (and so at least one geometry) | ||
if (dataSource.extent[0] === Infinity) { |
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.
maybe the isEmpty
function could be used:
import {isEmpty} from 'ol/extent.js';
if (isEmpty(dataSource.extent)) {
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.
thanks
dfd131c
to
06a461e
Compare
GSGMF-573