-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
@brunoabinader - is this the same as : #5623? |
@asheemmamoowala I think so - currently we have a generic GeoJSON converter in a sense that it accepts stringified JSON in |
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.
Hmm, this is definitely a workaround implementation. Ideally, we'd be converting the v8 object to our internal GeoJSON representation directly instead of stringifying. Not sure whether that's actually faster, but I imagine it is.
The intent is to reuse the same string-based converter already battle-proven and used by other platforms. I'd prefer to use this instead of implementing a whole new converter from scratch. |
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 is a good workaround for now. We can leave #5623 open.
platform/node/src/node_geojson.hpp
Outdated
|
||
Nan::HandleScope scope; | ||
|
||
v8::Local<v8::Object> JSON = Nan::To<v8::Object>( |
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.
Use Nan::JSON.Stringify
.
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.
Good call - we can use it here as well.
platform/node/test/ignores.json
Outdated
@@ -41,10 +41,9 @@ | |||
"render-tests/regressions/mapbox-gl-js#3548": "skip - needs issue", | |||
"render-tests/regressions/mapbox-gl-js#3682": "https://github.com/mapbox/mapbox-gl-js/issues/3682", | |||
"render-tests/regressions/mapbox-gl-native#7357": "https://github.com/mapbox/mapbox-gl-native/issues/7357", | |||
"render-tests/runtime-styling/image-add-sdf": "skip - https://github.com/mapbox/mapbox-gl-native/issues/9847", |
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.
There's probably a few other tests that can be enabled.
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.
Yes - render-tests/regressions/mapbox-gl-js#3548
.
9dc55ff
to
fb2648e
Compare
fb2648e
to
0f70c76
Compare
This is needed in order to let functions like
addSource
being used via style operators in render tests.