Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
vMap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marty Fabien
vMap
Commits
ba1c14d9
Commit
ba1c14d9
authored
6 years ago
by
Armand Bahi
Browse files
Options
Downloads
Patches
Plain Diff
Comparaison sur la fenêtre légende
parent
051f1865
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/module_vmap/module/javascript/app/vmap/mapmanager/maplegend.js
+32
-4
32 additions, 4 deletions
...e_vmap/module/javascript/app/vmap/mapmanager/maplegend.js
src/module_vmap/module/template/layers/maplegend.html
+27
-4
27 additions, 4 deletions
src/module_vmap/module/template/layers/maplegend.html
with
59 additions
and
8 deletions
src/module_vmap/module/javascript/app/vmap/mapmanager/maplegend.js
+
32
−
4
View file @
ba1c14d9
...
...
@@ -136,7 +136,17 @@ nsVmap.nsMapManager.MapLegend.prototype.maplegendController = function ($scope)
/**
* @private
*/
this
[
'
aUrls
'
]
=
[];
this
[
'
oUrls
'
]
=
{};
/**
* @private
*/
this
[
'
oCompareUrls
'
]
=
{};
/**
* The active map
*/
$scope
[
'
activeMap
'
]
=
1
;
/**
* Contains the events stocked by listenLayers()
...
...
@@ -158,6 +168,18 @@ nsVmap.nsMapManager.MapLegend.prototype.maplegendController = function ($scope)
});
};
/**
* Resize the layertools
*/
nsVmap
.
nsMapManager
.
MapLegend
.
prototype
.
maplegendController
.
prototype
.
resize
=
function
()
{
oVmap
.
log
(
'
nsVmap.nsMapManager.MapLegend.maplegendController.resize
'
);
setTimeout
(
function
()
{
oVmap
.
resizeLayerTools
();
});
}
/**
* Loads the legend
* @export
...
...
@@ -165,18 +187,24 @@ nsVmap.nsMapManager.MapLegend.prototype.maplegendController = function ($scope)
nsVmap
.
nsMapManager
.
MapLegend
.
prototype
.
maplegendController
.
prototype
.
loadLegend
=
function
()
{
oVmap
.
log
(
'
nsVmap.nsMapManager.MapLegend.maplegendController.loadLegend
'
);
this
[
'
oUrls
'
]
=
this
.
getLegendUrls
();
this
[
'
oUrls
'
]
=
this
.
getLegendUrls
(
oVmap
.
getMap
().
getOLMap
()
);
this
.
downloadLegendImgs
(
this
[
'
oUrls
'
]);
if
(
this
.
$scope_
[
"
$root
"
][
"
compare_enabled
"
]){
this
[
'
oCompareUrls
'
]
=
this
.
getLegendUrls
(
oVmap
.
getMapCompare
().
getOLMap
());
this
.
downloadLegendImgs
(
this
[
'
oCompareUrls
'
]);
}
};
/**
* Get the legend URLs
* @param {object} olMap
* @returns {object}
*/
nsVmap
.
nsMapManager
.
MapLegend
.
prototype
.
maplegendController
.
prototype
.
getLegendUrls
=
function
()
{
nsVmap
.
nsMapManager
.
MapLegend
.
prototype
.
maplegendController
.
prototype
.
getLegendUrls
=
function
(
olMap
)
{
oVmap
.
log
(
'
nsVmap.nsMapManager.MapLegend.maplegendController.getLegendUrls
'
);
var
aLayers
=
o
Vmap
.
getMap
().
getOL
Map
()
.
getLayers
().
getArray
();
var
aLayers
=
o
l
Map
.
getLayers
().
getArray
();
var
oUrls
=
{};
// Récupération des URL WMS
...
...
This diff is collapsed.
Click to expand it.
src/module_vmap/module/template/layers/maplegend.html
+
27
−
4
View file @
ba1c14d9
...
...
@@ -12,11 +12,15 @@
</div>
</div>
<div
id=
"maplegendcontainer"
class=
"layers-tool legend"
collapse=
"{{ctrl.legend_collapsed === true ? 'out' : 'in'}}"
>
<ul
class=
"nav nav-tabs layerstree-nav"
>
<li
class=
"active"
><a
data-toggle=
"tab"
href=
"#map1"
>
Carte 1
</a></li>
<li><a
data-toggle=
"tab"
href=
"#map1"
>
Carte 2
</a></li>
<ul
class=
"nav nav-tabs layerstree-nav"
ng-show=
"$root.compare_enabled"
>
<li
ng-class=
"{'active' : activeMap == 1}"
>
<a
href=
"#"
ng-click=
"activeMap=1;ctrl.resize()"
>
Carte 1
</a>
</li>
<li
ng-class=
"{'active' : activeMap == 2}"
>
<a
href=
"#"
ng-click=
"activeMap=2;ctrl.resize()"
>
Carte 2
</a>
</li>
</ul>
<div
id=
"maplegend"
class=
"tree legend"
>
<div
id=
"maplegend"
class=
"tree legend"
ng-show=
"activeMap == 1 || !$root.compare_enabled"
>
<div
ng-repeat=
"(sLayerName, layer) in ctrl.oUrls"
class=
"layer-legend"
ng-show=
"ctrl.areLegendsLoaded(layer)"
>
<div
id=
"legend_father{{$index}}"
data-toggle=
"collapse"
data-target=
"#legend_element_{{$index}}"
>
...
...
@@ -34,5 +38,24 @@
</div>
</div>
</div>
<div
id=
"compare_maplegend"
class=
"tree legend"
ng-show=
"activeMap == 2 && $root.compare_enabled"
>
<div
ng-repeat=
"(sLayerName, layer) in ctrl.oCompareUrls"
class=
"layer-legend"
ng-show=
"ctrl.areLegendsLoaded(layer)"
>
<div
id=
"compare_legend_father{{$index}}"
data-toggle=
"collapse"
data-target=
"#compere_legend_element_{{$index}}"
>
<div
style=
"display: inline-block; width:98%"
>
<div
class=
"legend_father_name"
title=
"{{sLayerName}}"
>
{{sLayerName}}
</div>
</div>
</div>
<div
id=
"compare_legend_element_{{$index}}"
class=
"collapse in"
>
<ul
class=
"list-group-item auto-height"
>
<div
ng-repeat=
"node in layer"
ng-show=
"node.legendBlobURL"
>
<img
ng-src=
"{{node.legendBlobURL}}"
class=
"legend-img"
legend-image-node
>
</div>
</ul>
</div>
</div>
</div>
</div>
</div>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment