Skip to content

Commit

Permalink
#6 - Map feature click and popup - Attaching legend for each map - Ma…
Browse files Browse the repository at this point in the history
…p titles correction
  • Loading branch information
eamador committed Apr 18, 2017
1 parent 2ced605 commit d480322
Show file tree
Hide file tree
Showing 9 changed files with 163 additions and 13 deletions.
38 changes: 38 additions & 0 deletions src/assets/maps/legend_map.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/css/shared/elements/info/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ info {

.titleWrapper {
display: flex;
align-items: center;
margin-bottom: 8px;
.btn {
background-color: white;
Expand Down
15 changes: 15 additions & 0 deletions src/css/shared/steps/map/styles.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import url('https://api.tiles.mapbox.com/mapbox-gl-js/v0.35.1/mapbox-gl.css');

map {
.bg_blanco();
#map {
Expand All @@ -6,6 +8,16 @@ map {
width: 100%;
height: 100%;
}

.mapboxgl-control-container {
display: none !important;
}
.mapboxgl-popup {
.mapboxgl-popup-content {
padding-top: 15px;
}
}

> .component-container{
position: relative;
.step-locked {
Expand All @@ -22,6 +34,9 @@ map {

&:not(.top) {
bottom: 32px;
&.legend {
bottom: 12px;
}
}
&.top {
top: 16px;
Expand Down
12 changes: 11 additions & 1 deletion src/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/* Let's default this puppy out
-------------------------------------------------------------------------------*/
@import url('https://fonts.googleapis.com/css?family=Fira+Sans:200,300,400,400i,500,600,600i,700,800,900|Merriweather:300,400,400i,700,700i,900,900i');
@import url('https://api.tiles.mapbox.com/mapbox-gl-js/v0.35.1/mapbox-gl.css');
html,
body,
body div,
Expand Down Expand Up @@ -4648,7 +4649,7 @@ info > .component-container .allMapLayers .mapLayerWrapper:not(:last-child) {
}
info > .component-container .titleWrapper {
display: flex;
align-items: center;
/*align-items: center;*/
margin-bottom: 8px;
}
info > .component-container .titleWrapper .btn {
Expand Down Expand Up @@ -5606,6 +5607,12 @@ map #map {
width: 100%;
height: 100%;
}
map .mapboxgl-control-container {
display: none !important;
}
map .mapboxgl-popup .mapboxgl-popup-content {
padding-top: 15px;
}
map > .component-container {
position: relative;
}
Expand All @@ -5623,6 +5630,9 @@ map > .component-container > div > .btn-row {
map > .component-container > div > .btn-row:not(.top) {
bottom: 32px;
}
map > .component-container > div > .btn-row:not(.top).legend {
bottom: 12px;
}
map > .component-container > div > .btn-row.top {
top: 16px;
}
Expand Down
45 changes: 36 additions & 9 deletions src/data/stories.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,12 @@
"collapsed": false,
"info": [
{
"title": "Title here",
"title": "Species richness of butterflies in the Mediterranean region",
"credit": "",
"collapsed" : false,
"shp": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/All_species_count.zip",
"wms": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/Endemic_richness_count_hex.zip",
"legend": "/assets/maps/legend_map.svg",
"elements": [
{
"type": "paragraph",
Expand Down Expand Up @@ -128,9 +131,12 @@
}
},
{
"title": "Title here 2",
"title": "Distribution of threatened butterflies in the Mediterranean region",
"collapsed" : true,
"credit": "",
"shp": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/Theatened_richness_count.zip",
"wms": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/Endemic_richness_count_hex.zip",
"legend": "/assets/maps/legend_map.svg",
"elements": [
{
"type": "paragraph",
Expand Down Expand Up @@ -160,9 +166,12 @@
}
},
{
"title": "Title here 3",
"title": "Species richness of endemic butterflies in the Mediterranean region",
"collapsed" : true,
"credit": "",
"shp": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/Endemic_richness_count_hex.zip",
"wms": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/Endemic_richness_count_hex.zip",
"legend": "/assets/maps/legend_map.svg",
"elements": [
{
"type": "paragraph",
Expand Down Expand Up @@ -363,9 +372,12 @@
"collapsed": false,
"info": [
{
"title": "Title here",
"title": "Species richness of butterflies in the Mediterranean region",
"credit": "",
"collapsed" : false,
"shp": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/All_species_count.zip",
"wms": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/Endemic_richness_count_hex.zip",
"legend": "/assets/maps/legend_map.svg",
"elements": [
{
"type": "paragraph",
Expand Down Expand Up @@ -395,9 +407,12 @@
}
},
{
"title": "Title here 2",
"title": "Distribution of threatened butterflies in the Mediterranean region",
"collapsed" : true,
"credit": "",
"shp": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/Theatened_richness_count.zip",
"wms": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/Endemic_richness_count_hex.zip",
"legend": "/assets/maps/legend_map.svg",
"elements": [
{
"type": "paragraph",
Expand Down Expand Up @@ -427,9 +442,12 @@
}
},
{
"title": "Title here 3",
"title": "Species richness of endemic butterflies in the Mediterranean region",
"collapsed" : true,
"credit": "",
"shp": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/Endemic_richness_count_hex.zip",
"wms": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/Endemic_richness_count_hex.zip",
"legend": "/assets/maps/legend_map.svg",
"elements": [
{
"type": "paragraph",
Expand Down Expand Up @@ -630,9 +648,12 @@
"collapsed": false,
"info": [
{
"title": "Title here",
"title": "Species richness of butterflies in the Mediterranean region",
"credit": "",
"collapsed" : false,
"shp": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/All_species_count.zip",
"wms": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/Endemic_richness_count_hex.zip",
"legend": "/assets/maps/legend_map.svg",
"elements": [
{
"type": "paragraph",
Expand Down Expand Up @@ -662,9 +683,12 @@
}
},
{
"title": "Title here 2",
"title": "Distribution of threatened butterflies in the Mediterranean region",
"collapsed" : true,
"credit": "",
"shp": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/Theatened_richness_count.zip",
"wms": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/Endemic_richness_count_hex.zip",
"legend": "/assets/maps/legend_map.svg",
"elements": [
{
"type": "paragraph",
Expand Down Expand Up @@ -694,9 +718,12 @@
}
},
{
"title": "Title here 3",
"title": "Species richness of endemic butterflies in the Mediterranean region",
"collapsed" : true,
"credit": "",
"shp": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/Endemic_richness_count_hex.zip",
"wms": "https://s3-eu-west-1.amazonaws.com/iucn-med-storymaps.geographica.io/static/shp/Endemic_richness_count_hex.zip",
"legend": "/assets/maps/legend_map.svg",
"elements": [
{
"type": "paragraph",
Expand Down
32 changes: 32 additions & 0 deletions src/shared/steps/map/MapStep.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d480322

Please sign in to comment.