Skip to content

Commit

Permalink
cody tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
jamaps committed Sep 10, 2024
1 parent 205299e commit f117a78
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 155 deletions.
Binary file modified data/cre-print.qgz
Binary file not shown.
47 changes: 21 additions & 26 deletions src/assets/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
--brandGray90: #191919;
--brandRed: #DA291C;
--brandOrange: #D67C00;

}

body {
Expand All @@ -58,7 +57,6 @@ body {
height: 420px;
height: 100vh;
overflow: auto;
/* float: left; */
background-color: var(--brandWhite);
border-right: solid 1px var(--brandGray);
}
Expand All @@ -74,15 +72,13 @@ body {
height: 100vh;
width: calc(100vw - 420px);
min-width: 420px;
/* flex-grow: 1; */
/* float: left; */
background-color: var(--brandLightBlue);
}

@media screen and (max-width: 820px) {
#container {
flex-direction: column-reverse;
}
flex-direction: column-reverse;
}
#map {
height: 50vh;
width: 100vw;
Expand Down Expand Up @@ -111,48 +107,47 @@ h1 {
}

h2 {
text-align: left;
font-family: Arial, Helvetica, sans-serif;
text-align: left;
font-family: Arial, Helvetica, sans-serif;
font-weight: 600;
font-size: 24px;
font-size: 24px;
padding-bottom: 4px;
/* border-bottom: solid 2px var(--brandRed); */
margin-left: 16px;
margin-left: 16px;
margin-right: 16px;
margin-top: 8px;
color: var(--brandGray80);
color: var(--brandGray80);
}

h3 {
text-align: left;
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
text-align: left;
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
margin: 16px;
padding-left: 4px;
border-left: solid 3px var(--brandRed);
color: var(--brandBlack);
border-left: solid 3px var(--brandRed);
color: var(--brandBlack);
}

h4 {
text-align: left;
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
text-align: left;
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
margin: 13px;
margin-top: 26px;
margin-bottom: -10px;
font-weight: 400;
text-decoration: underline;
padding-left: 4px;
/* border-left: solid 3px var(--brandRed); */
color: var(--brandBlack);
color: var(--brandBlack);
}

p {
font-family: Arial, Helvetica, sans-serif;
color: var(--brandBlack);
text-align: left;
font-size: 14px;
line-height: 20px;
font-family: Arial, Helvetica, sans-serif;
color: var(--brandBlack);
text-align: left;
font-size: 14px;
line-height: 20px;
margin: 16px;
}

Expand Down
138 changes: 9 additions & 129 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,6 @@ onMount(() => {
data: housing
})
//triangle symbol for housing
let housingImage = new Image();
housingImage.src = triangle_housing;
housingImage.onload = function (){
Expand All @@ -658,17 +656,6 @@ onMount(() => {
'id': 'housing',
'type': 'circle',
'source': 'housing',
// 'layout': {
// "icon-image": "triangle_housing",
// "icon-size": [
// "interpolate", ["linear"], ["zoom"],
// 0.05,
// 0.01,
// 25,
// 1.3
// ],
// "icon-allow-overlap": true
// },
'paint': {
"circle-color":"#000",
"circle-radius": [
Expand All @@ -677,7 +664,6 @@ onMount(() => {
12, 3.5
],
"circle-opacity": 0
// "icon-opacity":0
}
});
Expand All @@ -688,7 +674,6 @@ onMount(() => {
data: rec
})
//triangle symbol for rec centre
let recImage = new Image();
recImage.src = triangle_rec;
recImage.onload = function (){
Expand Down Expand Up @@ -745,14 +730,14 @@ onMount(() => {
['get', 'T'],
'Own', '#fff',
'Rent', '#fff',
'#fff' //grey
'#fff'
],
"circle-opacity": [
'match',
['get', 'T'],
'Own', 1,
'Rent', 1,
1 //grey
1
],
"circle-stroke-opacity": [
'match',
Expand Down Expand Up @@ -800,111 +785,6 @@ onMount(() => {
map.getCanvas().style.cursor = '';
});
// Add tool tips for Library
// map.on('click', 'library', (e) => {
// const coordinates = e.features[0].geometry.coordinates.slice();
// const description = e.features[0].properties["Branch Name"];
// const type = " (Library)"
// while (Math.abs(e.lngLat.lng - coordinates[0]) > 180) {
// coordinates[0] += e.lngLat.lng > coordinates[0] ? 360 : -360;
// }
// const htmlContent = description + type
// const popup = new maplibregl.Popup({closeOnClick: true, closeButton: false})
// .setLngLat(coordinates)
// .setHTML(htmlContent)
// .addTo(map);
// const popupContent = popup._content;
// if (popupContent) {
// popupContent.style.padding = '6px 12px 6px 6px'
// popupContent.style.backgroundColor = '#ffffff';
// popupContent.style.boxShadow = '0 0 10px rgba(0, 0, 0, 0.2)';
// popupContent.style.opacity = 0.95;
// }
// });
// map.on('mouseenter', 'library', () => {
// map.getCanvas().style.cursor = 'pointer';
// });
// map.on('mouseleave', 'library', () => {
// map.getCanvas().style.cursor = '';
// });
// // Add tool tips for RecCentre
// map.on('click', 'rec', (e) => {
// const coordinates = e.features[0].geometry.coordinates.slice();
// const description = e.features[0].properties["Name"];
// const type = " (Community Centre)"
// while (Math.abs(e.lngLat.lng - coordinates[0]) > 180) {
// coordinates[0] += e.lngLat.lng > coordinates[0] ? 360 : -360;
// }
// const htmlContent = description + type
// const popup = new maplibregl.Popup({closeOnClick: true, closeButton: false})
// .setLngLat(coordinates)
// .setHTML(htmlContent)
// .addTo(map);
// const popupContent = popup._content;
// if (popupContent) {
// popupContent.style.padding = '6px 12px 6px 6px'
// popupContent.style.backgroundColor = '#ffffff';
// popupContent.style.boxShadow = '0 0 10px rgba(0, 0, 0, 0.2)';
// popupContent.style.opacity = 0.95;
// }
// });
// map.on('mouseenter', 'rec', () => {
// map.getCanvas().style.cursor = 'pointer';
// });
// map.on('mouseleave', 'rec', () => {
// map.getCanvas().style.cursor = '';
// });
// // Add tool tips for Community Housing and Shelters
// map.on('click', 'housing', (e) => {
// const coordinates = e.features[0].geometry.coordinates.slice();
// const description = e.features[0].properties["Name"];
// const type = " (Type: " + e.features[0].properties["Type"] + ")";
// while (Math.abs(e.lngLat.lng - coordinates[0]) > 180) {
// coordinates[0] += e.lngLat.lng > coordinates[0] ? 360 : -360;
// }
// const htmlContent = description + type
// const popup = new maplibregl.Popup({closeOnClick: true, closeButton: false})
// .setLngLat(coordinates)
// .setHTML(htmlContent)
// .addTo(map);
// const popupContent = popup._content;
// if (popupContent) {
// popupContent.style.padding = '6px 12px 6px 6px'
// popupContent.style.backgroundColor = '#ffffff';
// popupContent.style.boxShadow = '0 0 10px rgba(0, 0, 0, 0.2)';
// popupContent.style.opacity = 0.95;
// }
// });
// map.on('mouseenter', 'housing', () => {
// map.getCanvas().style.cursor = 'pointer';
// });
// map.on('mouseleave', 'housing', () => {
// map.getCanvas().style.cursor = '';
// });
})
</script>
Expand All @@ -913,8 +793,6 @@ onMount(() => {

<div id="panel">
<h1>Community Real Estate</h1>
<!-- Content for the left panel -->
<!-- You can add text, images, or other elements here -->
<p>This map examines the real estate landscape of the Greater Toronto Area's (GTA) community services sector as of 2021. The map allows us to analyze the distribution of owned and leased Community Real Estate (CRE) offering services in Peel, Toronto and York Region and their proximity to equity-seeking groups, providing insight into risks and opportunities for preserving and developing CRE within the community services sector.
</p>

Expand Down Expand Up @@ -1080,15 +958,17 @@ onMount(() => {

</div>

<div id="map">

<!-- Content for the right panel -->
<!-- You can add text, images, or other elements here -->
</div>

<div id="map"></div>


</div>




<style>
.check-box {
margin-left: 16px;
margin-right: 16px;
Expand Down

0 comments on commit f117a78

Please sign in to comment.