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 617 - Iframe API new app #4339

Merged
merged 3 commits into from Oct 31, 2018

Conversation

adube
Copy link
Contributor

@adube adube commented Oct 26, 2018

This patch introduces a new application called iframe_api, which is designed to be included within an iframe and doesn't have any tool in it.

This patch also introduces a new AbstractAPIController, which creates only the map, ensures that the bbox query tool can be implemented and defines some query options. Desktop now inherits from it.

See also: https://jira.camptocamp.com/browse/GSGMF-617

Attribution

The app includes a olAttribution, but it would seem that none of the layers created by GMF/NGEO are configured to work with it. This is worth discussing...

We're using the disclaimer instead.

LayerTree

While working on the disclaimer / attribution, I noticed that the disclaimer component was already there but nothing was shown. I also noticed that there were not layers being created in the map. Then, I remembered: the <gmf-layertree> is mandatory if we want our layers to be created in GMF.

So, as part of this app, it is created, but hidden using CSS. As soon as I did that, I saw the disclaimers appear and the features on the map as well from the layers loaded in the default theme.

@adube adube force-pushed the v2_4-617-gmf-app-iframe_api branch from 26eaea1 to 35f1f27 Compare October 26, 2018 17:32
* @export
*/
const exports = function($scope, $injector) {
gmfControllersAbstractDesktopController.call(this, {
Copy link
Member

Choose a reason for hiding this comment

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

I it a good idea to use the AbstractDesktopController?
For me he contains many things that not useed on API interface ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good point. Indeed, AbstractDesktopController contains more things that are not required by IframeAPI those required:

  • map creation
  • feature helper / vector features (if we want to load vector features in the map)
  • isDesktop true
  • query options

If you think it is best to have those copied in the controller of the app and extend AbstractAppController, please let me know.

Copy link
Member

Choose a reason for hiding this comment

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

Isn't the best to create an AbstractAPIController and AbstractDesktopController will extend it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I'll do that.

@adube adube force-pushed the v2_4-617-gmf-app-iframe_api branch from 35f1f27 to b5eecc9 Compare October 29, 2018 19:39
@sbrunner sbrunner added this to the 2.4 milestone Oct 30, 2018
@adube
Copy link
Contributor Author

adube commented Oct 30, 2018

@sbrunner Ready for review.

@sbrunner
Copy link
Member

Thanks :-)

@adube
Copy link
Contributor Author

adube commented Oct 30, 2018

@sbrunner Thanks.

(Before merging): Should we address the attribution issue in an other task, then? (see description above)

@sbrunner
Copy link
Member

@adube Effectively it seem that's not used, can you remove it on all the applications?
Thanks :-)

@sbrunner
Copy link
Member

And merge it :-)

@adube adube merged commit 1a01c3f into camptocamp:master Oct 31, 2018
@adube adube deleted the v2_4-617-gmf-app-iframe_api branch October 31, 2018 12:38
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

2 participants