Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Géocontrib Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
GéoContrib
Géocontrib Frontend
Commits
fcca6b7a
Commit
fcca6b7a
authored
2 years ago
by
Timothee P
Browse files
Options
Downloads
Patches
Plain Diff
add sidebar layer to projet detail page in order to display user customized basemaps
parent
44877115
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/Project/Detail/ProjectFeatureTypes.vue
+3
-0
3 additions, 0 deletions
src/components/Project/Detail/ProjectFeatureTypes.vue
src/views/Project/ProjectDetail.vue
+47
-37
47 additions, 37 deletions
src/views/Project/ProjectDetail.vue
with
50 additions
and
37 deletions
src/components/Project/Detail/ProjectFeatureTypes.vue
+
3
−
0
View file @
fcca6b7a
...
...
@@ -742,6 +742,9 @@ export default {
.nouveau-type-signalement {
margin-top: 1em;
& > .button {
margin-right: 0 !important;
}
}
.nouveau-type-signalement .label{
cursor: pointer;
...
...
This diff is collapsed.
Click to expand it.
src/views/Project/ProjectDetail.vue
+
47
−
37
View file @
fcca6b7a
...
...
@@ -38,21 +38,39 @@
/>
</div>
<div
class=
"eight wide column map-container"
>
<div
:class=
"
{ active: mapLoading }"
class="ui inverted dimmer"
>
<div
class=
"ui text loader"
>
Chargement de la carte...
<div
class=
"eight wide column block-map"
>
<div
class=
"map-container"
>
<div
id=
"map"
ref=
"map"
/>
<div
:class=
"
{ active: mapLoading }"
class="ui inverted dimmer"
>
<div
class=
"ui text loader"
>
Chargement de la carte...
</div>
</div>
<SidebarLayers
v-if=
"basemaps && map"
ref=
"sidebar"
/>
<div
id=
"popup"
class=
"ol-popup"
>
<a
id=
"popup-closer"
href=
"#"
class=
"ol-popup-closer"
/>
<div
id=
"popup-content"
/>
</div>
</div>
<div
id=
"map"
ref=
"map"
/>
<router-link
id=
"features-list"
:to=
"
{
...
...
@@ -68,20 +86,6 @@
Voir tous les signalements
</div>
</router-link>
<div
id=
"popup"
class=
"ol-popup"
>
<a
id=
"popup-closer"
href=
"#"
class=
"ol-popup-closer"
/>
<div
id=
"popup-content"
/>
</div>
</div>
</div>
...
...
@@ -139,6 +143,7 @@ import ProjectLastFeatures from '@/components/Project/Detail/ProjectLastFeatures
import
ProjectLastComments
from
'
@/components/Project/Detail/ProjectLastComments
'
;
import
ProjectParameters
from
'
@/components/Project/Detail/ProjectParameters
'
;
import
ProjectModal
from
'
@/components/Project/Detail/ProjectModal
'
;
import
SidebarLayers
from
'
@/components/Map/SidebarLayers
'
;
export
default
{
name
:
'
ProjectDetail
'
,
...
...
@@ -149,7 +154,8 @@ export default {
ProjectLastFeatures
,
ProjectLastComments
,
ProjectParameters
,
ProjectModal
ProjectModal
,
SidebarLayers
,
},
filters
:
{
...
...
@@ -210,7 +216,9 @@ export default {
'
reloadIntervalId
'
,
]),
...
mapState
(
'
map
'
,
[
'
map
'
'
map
'
,
'
basemaps
'
,
'
availableLayers
'
,
]),
API_BASE_URL
()
{
return
this
.
configuration
.
VUE_APP_DJANGO_API_BASE
;
...
...
@@ -410,14 +418,12 @@ export default {
async
initMap
()
{
if
(
this
.
project
&&
this
.
permissions
.
can_view_project
)
{
const
baseMaps
=
this
.
$store
.
state
.
map
.
basemaps
;
const
layers
=
this
.
$store
.
state
.
map
.
availableLayers
;
let
layersToLoad
;
if
(
base
M
aps
&&
base
M
aps
.
length
>
0
)
{
if
(
this
.
base
m
aps
&&
this
.
base
m
aps
.
length
>
0
)
{
const
basemapIndex
=
0
;
layersToLoad
=
base
M
aps
[
basemapIndex
].
layers
;
layersToLoad
=
this
.
base
m
aps
[
basemapIndex
].
layers
;
layersToLoad
.
forEach
((
layerToLoad
)
=>
{
l
ayers
.
forEach
((
layer
)
=>
{
this
.
availableL
ayers
.
forEach
((
layer
)
=>
{
if
(
layer
.
id
===
layerToLoad
.
id
)
{
layerToLoad
=
Object
.
assign
(
layerToLoad
,
layer
);
}
...
...
@@ -473,18 +479,22 @@ export default {
</
script
>
<
style
lang=
"less"
scoped
>
.fullwidth {
width: 100%;
}
.
map-container
{
.
block-map
{
display: flex !important;
flex-direction: column;
.map-container {
position: relative;
height: 100%;
#map {
border: 1px solid grey;
}
}
.button {
margin-top: 0.5em;
}
}
</
style
>
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