Skip to content

Commit

Permalink
Only check if it is the events page for affiliateTrue in map.js
Browse files Browse the repository at this point in the history
In index.html, check for motpLink and for eventLink, as some data has the older name, and some the newer one.
  • Loading branch information
colodzin committed Dec 10, 2018
1 parent c2bb4f4 commit 1804827
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ <h3>{{activeGroup.name}}</h3>
<div v-if="activeGroup.eventLink" class="event-link">
<a :href="activeGroup.eventLink" target="_blank">Find out more</a>
</div>
<div v-if="activeGroup.motpLink" class="event-link">
<a :href="activeGroup.motpLink" target="_blank">Find out more</a>
</div>
<div v-if="activeGroup.host" class="hosted-by">
Hosted by: {{activeGroup.host}}
</div>
Expand Down
8 changes: 4 additions & 4 deletions map.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const app = new Vue({
}
// familySepEvents
if (familySepEventsPast.features.length) {
var icon = (isEventsPage ? defaultIcon : 'star-gray-light');
var icon = 'star-gray-light';
var iconImg = icon + ".svg";
_this.map.addSource('marchon-family-sep-events-past-geojson', { type: 'geojson', data: familySepEventsPast });
_this.addLayer('marchon-family-sep-events-past', 'marchon-family-sep-events-past-geojson', { 'icon-image': icon });
Expand All @@ -219,7 +219,7 @@ const app = new Vue({
});
}
if (familySepEventsFuture.features.length) {
var icon = (isEventsPage ? defaultIcon : 'star-blue');
var icon = 'star-blue';
var iconImg = icon + ".svg";
_this.map.addSource('marchon-family-sep-events-future-geojson', { type: 'geojson', data: familySepEventsFuture });
_this.addLayer('marchon-family-sep-events-future', 'marchon-family-sep-events-future-geojson', { 'icon-image': icon });
Expand All @@ -232,7 +232,7 @@ const app = new Vue({
}

if (marchonpollsFlagshipEvents.features.length) {
var icon = (isEventsPage ? defaultIcon : 'star-pink');
var icon = 'star-pink';
var iconImg = icon + ".svg";
_this.map.addSource('marchopolls-flaghsip-events-geojson', { type: 'geojson', data: marchonpollsFlagshipEvents });
_this.addLayer('marchonpolls-flagship-events', 'marchopolls-flaghsip-events-geojson', { 'icon-image': icon });
Expand All @@ -244,7 +244,7 @@ const app = new Vue({
});
}
if (marchonpollsEvents.features.length) {
var icon = (isEventsPage ? defaultIcon : 'star-black');
var icon = 'star-black';
var iconImg = icon + ".svg";
_this.map.addSource('marchopolls-events-geojson', { type: 'geojson', data: marchonpollsEvents });
_this.addLayer('marchonpolls-events', 'marchopolls-events-geojson', { 'icon-image': icon });
Expand Down

0 comments on commit 1804827

Please sign in to comment.