Skip to content
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 and update several features in FeatureLayer #1083

Merged
merged 4 commits into from
Apr 30, 2018
Merged

Conversation

Biboba
Copy link
Contributor

@Biboba Biboba commented Apr 7, 2018

Add the possibility to add and update several features (updateFeatures, addFeatures) by specifying a geojson featureCollection object (issue 1055)

@Biboba
Copy link
Contributor Author

Biboba commented Apr 7, 2018

Though I think it would make more sense to have one single function deleteFeatures, updateFeatures, addFeatures handling any geojson (feature and featureCollection) just like the REST API does.

@jgravois
Copy link
Contributor

jgravois commented Apr 9, 2018

very cool @Biboba. thank you!

I think it would make more sense to have one single function (...) handling any GeoJSON (feature and featureCollection)

that'd be okay with me as long as we keep the historic methods around.

@Biboba
Copy link
Contributor Author

Biboba commented Apr 9, 2018

So I left addFeature, updateFeature, removeFeature and respected the old response to the callback signature with a single element rather than an array.

@Biboba
Copy link
Contributor Author

Biboba commented Apr 22, 2018

Hi @jgravois,
Looks good to you ?
Thanks !

Copy link
Contributor

@jgravois jgravois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've been putting out other 🔥s. this looks great.

pushed a small commit to enable updateFeatures() to form requests correctly when services have an objectid field with a different name.

}
}]
}, function (error, response) {
expect(response).to.deep.equal([{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i noticed that the syntax errors i fixed in 872de35 didn't actually induce an error in your test because you're currently only introspecting the mock service response (and not the actual request parameters) which this lib actually has control over.

@Biboba
Copy link
Contributor Author

Biboba commented Apr 24, 2018

Great !
Thanks for the feedback @jgravois

@jgravois jgravois merged commit b823548 into Esri:master Apr 30, 2018
jgravois added a commit to jgravois/esri-leaflet that referenced this pull request Apr 23, 2022
add and update several features in FeatureLayer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants