-
Notifications
You must be signed in to change notification settings - Fork 229
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
Error : geoJSONObject is undefined #315
Comments
Hello @geektortoise , Take a note that each feature should be in format:
|
Hello, Thanks for the hint. :-) I checked the component with the vl-source-vector and it seems that the error occurs when I do However, my createFeature function is the following
with I tested by adding the type value but it doesn't work Have a nice day |
Ok, you are adding features already read by format. I'm just think that it was malformed GeoJSON. |
One eternity later Thanks for the fix ! Have a nice day. :-) |
@ghettovoice running into a similar issue as @geektortoise however I'm using @geektortoise I'm assuming you were trying to update VueLayers within Cytomine? Any luck? |
@bmcalees with which version of vuelayers do you fall in this issue? v0.11 or v0.12? |
@ghettovoice v0.12 |
@bmcalees ok, I suppose that you call For a while to avoid this error you can just return array of features where each element can be GeoJSON feature or instance of ol/Feature |
Hello,
I don't know how much my problem is related to #302 so I create a new one.
In the Cytomine project, we are using your vuelayers project.
When using vuelayers with the version 0.11.22, I got a problem to display features. The features are displayed but I got an error in the browser console. You will find the stacktraces below.
I don't have this error with vuelayers 0.11.4, so I tested with different version and
Stacktraces :
In Firefox :
Unhandled promise rejection
TypeError: geoJSONObject is undefined
Stack trace:
readFeaturesFromObject@webpack-internal:///./node_modules/ol/format/GeoJSON.js:151:1
readFeatures@webpack-internal:///./node_modules/ol/format/JSONFeature.js:60:12
readSourceData@webpack-internal:///./node_modules/vuelayers/lib/vector-source/index.js:240:14
_callee$@webpack-internal:///./node_modules/vuelayers/lib/vector-source/index.js:163:32
...
In Chrome :
GeoJSON.js?a2e1:136 Uncaught (in promise) TypeError: Cannot read property 'type' of undefined
at GeoJSON.readFeaturesFromObject (GeoJSON.js?a2e1:136)
at GeoJSON.readFeatures (JSONFeature.js?377d:56)
at VueComponent.readSourceData (index.js?69ad:201)
Have a nice day !
Let me know if I can make some test to identify the origin of this problem.
The text was updated successfully, but these errors were encountered: