-
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
Add visible documentation about metadata and functionnalities #4894
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,19 +44,22 @@ import olSourceTileWMS from 'ol/source/TileWMS.js'; | |
|
||
|
||
/** | ||
* @hidden | ||
* The GeoMapFish DataSources Manager is responsible of listenening to the | ||
* c2cgeoportal's themes to create instances of `ngeo.datasource.DataSource` | ||
* objects with the layer definitions found and push them in the | ||
* `DataSources` collection. The Manager must be initialized | ||
* with the app's map using the setDatasourcseMap() method. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. setDatasourceMap() |
||
* | ||
* When changing theme, these data sources are cleared then re-created. | ||
* | ||
* Used metadata: | ||
* | ||
* * identifierAttributeField: The field used in the 'display query window' as feature title. | ||
* For WMS layers. | ||
*/ | ||
export class DatasourceManager { | ||
|
||
/** | ||
* The GeoMapFish DataSources Manager is responsible of listenening to the | ||
* c2cgeoportal's themes to create instances of `ngeo.datasource.DataSource` | ||
* objects with the layer definitions found and push them in the | ||
* `DataSources` collection. The Manager must be initialized | ||
* with the app's map using the setDatasourcseMap() method. | ||
* | ||
* When changing theme, these data sources are cleared then re-created. | ||
* | ||
* @param {angular.IQService} $q Angular q service | ||
* @param {!angular.IScope} $rootScope Angular rootScope. | ||
* @param {angular.ITimeoutService} $timeout Angular timeout service. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,9 +38,11 @@ function forEachDisclaimer(layer, func) { | |
|
||
|
||
/** | ||
* @constructor | ||
* @private | ||
* @hidden | ||
* Used metadata: | ||
* | ||
* * disclaimer: The disclaimer text for this element. | ||
* For WMS and WMTS layers, layer groups and themes. | ||
* | ||
* @param {!JQuery} $element Element. | ||
* @param {!angular.ISCEService} $sce Angular sce service. | ||
* @param {!angular.ITimeoutService} $timeout Angular timeout service. | ||
|
@@ -53,7 +55,7 @@ function forEachDisclaimer(layer, func) { | |
* @ngdoc controller | ||
* @ngname GmfDisclaimerController | ||
*/ | ||
function Controller( | ||
function DisclamerController( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be DisclaimerController |
||
$element, $sce, $timeout, gettextCatalog, ngeoDisclaimer, ngeoEventHelper, ngeoLayerHelper | ||
) { | ||
|
||
|
@@ -147,7 +149,7 @@ function Controller( | |
/** | ||
* Initialise the controller. | ||
*/ | ||
Controller.prototype.$onInit = function() { | ||
DisclamerController.prototype.$onInit = function() { | ||
this.layerVisibility = this.layerVisibility !== undefined ? this.layerVisibility : true; | ||
|
||
this.dataLayerGroup_ = this.ngeoLayerHelper_.getGroupFromMap(this.map, DATALAYERGROUP_NAME); | ||
|
@@ -158,7 +160,7 @@ Controller.prototype.$onInit = function() { | |
* @param {import("ol/Collection.js").CollectionEvent} evt Event. | ||
* @private | ||
*/ | ||
Controller.prototype.handleLayersAdd_ = function(evt) { | ||
DisclamerController.prototype.handleLayersAdd_ = function(evt) { | ||
this.timeout_(() => { | ||
const layer = evt.element; | ||
console.assert(layer instanceof olLayerBase); | ||
|
@@ -171,7 +173,7 @@ Controller.prototype.handleLayersAdd_ = function(evt) { | |
* @param {import("ol/Collection.js").CollectionEvent} evt Event. | ||
* @private | ||
*/ | ||
Controller.prototype.handleLayersRemove_ = function(evt) { | ||
DisclamerController.prototype.handleLayersRemove_ = function(evt) { | ||
const layer = evt.element; | ||
console.assert(layer instanceof olLayerBase); | ||
this.unregisterLayer_(layer); | ||
|
@@ -182,7 +184,7 @@ Controller.prototype.handleLayersRemove_ = function(evt) { | |
* @param {import("ol/layer/Base.js").default} layer Layer. | ||
* @private | ||
*/ | ||
Controller.prototype.registerLayer_ = function(layer) { | ||
DisclamerController.prototype.registerLayer_ = function(layer) { | ||
|
||
const layerUid = olUtilGetUid(layer); | ||
|
||
|
@@ -250,7 +252,7 @@ Controller.prototype.registerLayer_ = function(layer) { | |
* @param {import("ol/layer/Base.js").default} layer Layer. | ||
* @private | ||
*/ | ||
Controller.prototype.unregisterLayer_ = function(layer) { | ||
DisclamerController.prototype.unregisterLayer_ = function(layer) { | ||
|
||
const layerUid = olUtilGetUid(layer); | ||
|
||
|
@@ -273,7 +275,7 @@ Controller.prototype.unregisterLayer_ = function(layer) { | |
}; | ||
|
||
|
||
Controller.prototype.$onDestroy = function() { | ||
DisclamerController.prototype.$onDestroy = function() { | ||
this.unregisterLayer_(this.dataLayerGroup_); | ||
}; | ||
|
||
|
@@ -282,7 +284,7 @@ Controller.prototype.$onDestroy = function() { | |
* @param {string} msg Disclaimer message. | ||
* @private | ||
*/ | ||
Controller.prototype.showDisclaimerMessage_ = function(msg) { | ||
DisclamerController.prototype.showDisclaimerMessage_ = function(msg) { | ||
msg = this.gettextCatalog_.getString(msg); | ||
if (this.external) { | ||
if (this.msgs_.indexOf(msg) < 0) { | ||
|
@@ -305,7 +307,7 @@ Controller.prototype.showDisclaimerMessage_ = function(msg) { | |
* @param {string} msg Disclaimer message. | ||
* @private | ||
*/ | ||
Controller.prototype.closeDisclaimerMessage_ = function(msg) { | ||
DisclamerController.prototype.closeDisclaimerMessage_ = function(msg) { | ||
msg = this.gettextCatalog_.getString(msg); | ||
if (this.external) { | ||
this.visibility = false; | ||
|
@@ -374,7 +376,7 @@ Controller.prototype.closeDisclaimerMessage_ = function(msg) { | |
* @ngname gmfDisclaimer | ||
*/ | ||
const disclaimerComponent = { | ||
controller: Controller, | ||
controller: DisclamerController, | ||
bindings: { | ||
'layerVisibility': '<?gmfDisclaimerLayerVisibility', | ||
'popup': '<?gmfDisclaimerPopup', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,6 +123,16 @@ module.run(/* @ngInject */ ($templateCache) => { | |
* In order to create a new feature, you use the "Draw" button and digitize | ||
* the feature on the map. | ||
* | ||
* If no layers are editable the component will be hidden. | ||
* | ||
* Used metadata: | ||
* | ||
* * enumeratedAttributes: List of attribute names which have enumerated attribute | ||
* values (for filters purpose). For WMS layers. | ||
* * snappingConfig: The snapping configuration for the leaf. If set, the leaf's layer is considered to be | ||
* "snappable", even if the config itself is empty. | ||
* Example of value: {'tolerance': 50, 'edge': false} For WMS layers. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Example of value -> Example value |
||
* | ||
* Example: | ||
* | ||
* <gmf-editfeature | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,14 +129,30 @@ function gmfLayertreeTemplate($element, $attrs, gmfLayertreeTemplate) { | |
* metadata URLs in a new window. By default, and in the default template, | ||
* links will be opened in a popup (The window.openIframePopup function must be available !) | ||
* | ||
* Used UI metadata: | ||
* Used metadata: | ||
* | ||
* * isChecked: if 'false' the layer visibility will be set to false. | ||
* * iconUrl: layer icon full URL. | ||
* * legendRule: WMS rule used to get a layer icon. | ||
* * isLegendExpanded: if 'true' the legend is expanded by default. | ||
* * metadataUrl: Display a popup with the content of the given URL if | ||
* possible also open a new window. | ||
* * exclusiveGroup: Whether the group contain children that have to be mutually | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. contains |
||
* exclusive, meaning that only one child may be ON at any time. | ||
* * legend: Display the legend of this layers. For WMS and WMTS layers. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this layer. |
||
* * legendImage: The URL to the image used as a legend in the layer tree. For WMS and WMTS layers. | ||
* * maxResolution: The max resolution where the layer is visible. For WMS layers. | ||
* On WMTS layers it will have effect on the node in the layertree but not on the layertree directly. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it will have an effect |
||
* * minResolution: The min resolution where the layer is visible. For WMS layers. | ||
* On WMTS layers it will have effect on the node in the layertree but not on the layer directly. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it will have an effect |
||
* * ogcServer: The corresponding OGC server for a WMTS layer. For WMTS layers. | ||
* * opacity: Layer opacity. 1.0 means fuly visible, 0 means invisible, For WMS and WMTS layers. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fully |
||
* * timeAttribute: The name of the time attribute. For WMS(-T) layers. | ||
* * wmsLayers: A corresponding WMS layer for a WMTS layers. Used to query the WMTS layers and to print it. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... for a WMTS layer. Used to query the WMTS layer ... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. or: |
||
* (See also printLayers and queryLayers metadata for more granularity). For WMTS Layers. | ||
* * printLayers: A WMS layer that will be used instead of the WMTS layers in the print. | ||
* * queryLayers: The WMS layers used as references to query the WMTS layers. For WMTS layers. | ||
* * isExpanded: Whether the layer group is expanded by default. For layer groups (only). | ||
* | ||
* @htmlAttribute {import("ol/Map.js").default} gmf-layertree-map The map. | ||
* @htmlAttribute {Object<string, string>|undefined} gmf-layertree-dimensions Global dimensions 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.
of listenening -> for listening