-
Notifications
You must be signed in to change notification settings - Fork 86
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
Import DataSource Component (2) #2956
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adube
force-pushed
the
import-ds-02-component
branch
2 times, most recently
from
October 10, 2017 14:22
24baa6c
to
8646dd7
Compare
adube
changed the title
WIP Import DataSource Component (2)
Import DataSource Component (2)
Oct 10, 2017
adube
force-pushed
the
import-ds-02-component
branch
4 times, most recently
from
October 11, 2017 14:03
4f6d09d
to
7311faf
Compare
4 tasks
adube
force-pushed
the
import-ds-02-component
branch
4 times, most recently
from
October 13, 2017 13:17
7257963
to
e9299cd
Compare
adube
force-pushed
the
import-ds-02-component
branch
from
October 16, 2017 12:56
e9299cd
to
2182651
Compare
adube
force-pushed
the
import-ds-02-component
branch
from
October 16, 2017 13:14
2182651
to
6f0f211
Compare
The revision will take place in #2988. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces the
gmf-importdatasource
component:The
ngeo.Querent
service is now able to issue WMS GetCapatilities requests, and even cache the result in case we're using the OnlineResource url as unique key for the cache.A
gmf.datasource.ExternalDataSourcesManager
service is introduced in the PR to take care of managing the creation of the data sources that are created from the WMS Capabilities (WMTS and files will come in other tickets).The component has also been added to the
desktop_alt
app, in order to be able to test the logging in and out, i.e. while doing so, external data sources should be kept (this is the case in this PR).Change to the gmf.datasource.DataSourcesManager service
The manager used to always clear the collection of ngeo data sources upon changing theme, i.e. when logging in/out we cleared all of the ngeo data sources. This is no longer the case as part of this PR, as external data sources are added in there as well, and changing theme should not remove them.
To fix this, only the data sources that are in the manager cache are removed, thus leaving the external data sources in there, untouched.
Id of the external data sources
The concept of data source id is critical for the manager, queries, etc. to do their job accordingly. Each data source must have a unique numeric id. This is the case already for the data source that are created from the theme JSON.
For external data sources, we do not have an id, only a name. Also, a name is not enough as id, since multiple servers could have layers of the same name. As part of this PR, the id issue is addressed like this:
ol.getUid
This solution works as part of GMF, as long as the ids returned by the theme remain under the million. Please, validate this.
Todo
Example
You can use the following url to test: http://wms.geo.admin.ch/?lang=fr
You can test either in the GMF example, or in the desktop_alt app.
As part of this PR, no layer is actually added. The data source is simply pushed in the
ngeoDataSources
collection, nothing else. The creation of an OpenLayers layer will come in a separate PR.