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

Fix 610 - Render drawn features from draw tool in mobile apps #4243

Merged
merged 1 commit into from Sep 18, 2018

Conversation

adube
Copy link
Contributor

@adube adube commented Sep 17, 2018

Fixes GSGMF-610.

This fix makes it possible to draw features using the draw tool (a.k.a. red lining) from a desktop application, then copy the rl_features=zzz parameter from the url and then open a mobile application, paste the rl_features param in it and be able to see the features that were drawn, without the possibility to edit them.

It turned out to be a very simple fix. Here's a complete explanation why.

How it works

Ngeo provides a ngeoFeatures angular value, which is an ol.Collection. That value is injected in the GMF draw feature and it is where features are pushed when drawn.

GMF has a permalink module, which is responsible of reading params from the url. It also injects ngeoFeatures, and any features present in the url are automatically pushed in the collection.

Finally, the rendering of the features in a vector layer are not the responsability of the GMF draw tool. The abstract desktop controller was responsible of injecting ngeoFeatures and create a "FeatureOverlay" out of it. Moving this code to the abstract app controller was enough to make it work. No changes required in the draw tool at all.

@sbrunner
Copy link
Member

Should be on branch 2.3

@adube
Copy link
Contributor Author

adube commented Sep 18, 2018

Should be on branch 2.3

Jira marks this as 2.4. Also, this is a new feature. Should it really be in 2.3?

@adube
Copy link
Contributor Author

adube commented Sep 18, 2018

For the record: this is really 2.4. Merging...

@adube adube merged commit 4840a86 into camptocamp:master Sep 18, 2018
@adube adube deleted the v2_4-610-feature-draw-ro-mobile branch September 18, 2018 13:00
@adube
Copy link
Contributor Author

adube commented Sep 24, 2018

@sbrunner I'll create a PR for this.

@sbrunner
Copy link
Member

Thanks :-)

@sbrunner sbrunner added this to the 2.4 milestone Oct 30, 2018
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.

None yet

3 participants