Skip to content

Commit

Permalink
more stuff for the map symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
kauevestena committed Sep 2, 2024
1 parent c45c056 commit bb445bf
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 38 deletions.
6 changes: 3 additions & 3 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,20 +396,20 @@
'tactile_paving':{
'yes':{
'score_default' : 100,
'color' : '#0b7cf4',
'color' : '#6146d0',

'opacity' : 1,
},
'contrasted':{
'score_default' : 100,
'color' : '#0b7cf4',
'color' : '#6146d0',

'opacity' : 1,

},
'no':{
'score_default' : 0,
'color' : '#df393f',
'color' : '#bd1006',

'opacity' : 0,

Expand Down
34 changes: 23 additions & 11 deletions webmap/webmap_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,16 @@

#overlay-image {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0; /* Adjust as needed */
z-index: 0;
}

#overlay-image img {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
left: 1%;
transform: translate(0%, -50%);
}

</style>
Expand Down Expand Up @@ -172,7 +169,7 @@


<div id="overlay-image" style="display: none;">
<img src="https://kauevestena.github.io/opensidewalkmap_beta/oswm_codebase/assets/page_logo.png" alt="Overlay">
<img src="https://kauevestena.github.io/opensidewalkmap_beta/oswm_codebase/assets/page_logo.png" alt="Map Symbols">
</div>


Expand Down Expand Up @@ -427,17 +424,24 @@
showDefault: false,
showCheckbox: true,
onlyRendered: false,
reverseOrder: true
reverseOrder: true,
title: 'Layer Legend'
};

map.addControl(new MaplibreLegendControl.MaplibreLegendControl({}, legend_control_options), "top-right");


// MAP SYMBOLS HANDLING: start

// const switcherButton = document.querySelector('.maplibregl-legend-switcher');
// console.log(switcherButton);
// // console.log(switcherButton);
// const legendList = document.querySelector('.maplibregl-legend-list');
// console.log(legendList);
// // console.log(legendList);
// const overlayImage = document.getElementById('overlay-image');
// console.log(overlayImage);
// // console.log(overlayImage);

// const mapref = document.getElementById('map');


// switcherButton.addEventListener('click', function() {
// overlayImage.style.display = 'block';
Expand All @@ -451,6 +455,14 @@
// overlayImage.style.display = 'none';
// });

// mapref.addEventListener("dblclick", function() {
// overlayImage.style.display = 'none';
// });

// TODO: ability to drag the image around the map
// TODO: add key shortcuts

// MAP SYMBOLS HANDLING: end

});

Expand Down
48 changes: 24 additions & 24 deletions webmap/webmap_params.json
Original file line number Diff line number Diff line change
Expand Up @@ -3045,7 +3045,7 @@
],
"yes"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3054,7 +3054,7 @@
],
"contrasted"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3063,7 +3063,7 @@
],
"no"
],
"#df393f",
"#bd1006",
[
"==",
[
Expand Down Expand Up @@ -3106,7 +3106,7 @@
],
"yes"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3115,7 +3115,7 @@
],
"contrasted"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3124,7 +3124,7 @@
],
"no"
],
"#df393f",
"#bd1006",
[
"==",
[
Expand Down Expand Up @@ -3167,7 +3167,7 @@
],
"yes"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3176,7 +3176,7 @@
],
"contrasted"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3185,7 +3185,7 @@
],
"no"
],
"#df393f",
"#bd1006",
[
"==",
[
Expand Down Expand Up @@ -3228,7 +3228,7 @@
],
"yes"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3237,7 +3237,7 @@
],
"contrasted"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3246,7 +3246,7 @@
],
"no"
],
"#df393f",
"#bd1006",
[
"==",
[
Expand Down Expand Up @@ -3289,7 +3289,7 @@
],
"yes"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3298,7 +3298,7 @@
],
"contrasted"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3307,7 +3307,7 @@
],
"no"
],
"#df393f",
"#bd1006",
[
"==",
[
Expand Down Expand Up @@ -3350,7 +3350,7 @@
],
"yes"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3359,7 +3359,7 @@
],
"contrasted"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3368,7 +3368,7 @@
],
"no"
],
"#df393f",
"#bd1006",
[
"==",
[
Expand Down Expand Up @@ -3411,7 +3411,7 @@
],
"yes"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3420,7 +3420,7 @@
],
"contrasted"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3429,7 +3429,7 @@
],
"no"
],
"#df393f",
"#bd1006",
[
"==",
[
Expand Down Expand Up @@ -3473,7 +3473,7 @@
],
"yes"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3482,7 +3482,7 @@
],
"contrasted"
],
"#0b7cf4",
"#6146d0",
[
"==",
[
Expand All @@ -3491,7 +3491,7 @@
],
"no"
],
"#df393f",
"#bd1006",
[
"==",
[
Expand Down

0 comments on commit bb445bf

Please sign in to comment.