Skip to content

Commit

Permalink
coffeeshops and gas zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
tif-calin committed Feb 20, 2024
1 parent 3c1ddf1 commit eb15eef
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
10 changes: 7 additions & 3 deletions maps/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ const TILES = {
};

const OTHER_MAPS = [
{ label: 'GasBuddy gas price heatmap', url: 'https://www.gasbuddy.com/gaspricemap?lat=%LAT%&lng=%LNG%&z=7' },
{ label: 'GasBuddy gas price heatmap', url: 'https://www.gasbuddy.com/gaspricemap?lat=%LAT%&lng=%LNG%&z=8' },
{ label: 'REFUGE restrooms', url: 'https://www.refugerestrooms.org/restrooms?utf8=%E2%9C%93&lat=%LAT%&long=%LNG%' },
{ label: 'iNaturalist species observations', url: 'https://www.inaturalist.org/observations?lat=%LAT%&lng=%LNG%&place_id=any&radius=7&view=species' },
{ label: 'NYTimes 2020 election vote precinct map', url: 'https://www.nytimes.com/interactive/2021/upshot/2020-election-map.html' },
{ label: 'NYTimes 2016 election vote precinct map', url: 'https://www.nytimes.com/interactive/2018/upshot/election-2016-voting-precinct-maps.html#10.95/%LAT%/%LNG%/4069' },
{ label: 'co-op grocery stores map', url: 'https://grocerystory.coop/food-co-op-directory' },
{ label: 'free air pumps', url: 'https://www.freeairpump.com/map/' },
{ label: 'coffee', url: 'https://www.findmecoffee.com/' },
{ label: 'coffeeshops', url: 'https://www.findmecoffee.com/en/listings/1?latitude=%LAT%&&longitude=%LNG%&pagesize=50' },
{ label: 'weed legality by state', url: 'https://disa.com/marijuana-legality-by-state' },
{ label: 'boondocking', list: [
{ label: 'boondockerswelcome.com', url: 'https://www.boondockerswelcome.com/', comment: 'boondocking, $80/year for stays, $180/year to also stay at wineries, farms, breweries, etc' },
Expand Down Expand Up @@ -102,12 +102,14 @@ const populateOtherMaps = (lat = '', lng = '') => {
};

const main = async () => {
const LISTINGS_CONTAINER = document.querySelector('#table > tbody');
const RESTROOMS_TABLE = document.querySelector('#table');
const LISTINGS_CONTAINER = RESTROOMS_TABLE?.querySelector('#table > tbody');
const OTHER_MAPS_CONTAINER = document.querySelector('#other > ul');

populateOtherMaps();

const successCallback = async (position) => {
RESTROOMS_TABLE?.classList.add('reserve-height');
const { timestamp, coords } = position;

const latitude = coords.latitude;
Expand Down Expand Up @@ -166,6 +168,8 @@ const main = async () => {
LISTINGS_CONTAINER?.appendChild(listing);
});


RESTROOMS_TABLE?.classList.remove('reserve-height');
return { timestamp, coords };
};

Expand Down
2 changes: 1 addition & 1 deletion maps/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h2>Restrooms</h2>
</div>
<section class="island">
<noscript>please enable javascript to see results</noscript>
<table id="table">
<table id="table" class="reserve-height">
<thead>
<tr><td>info</td><td>address</td><td>distance</td></tr>
</thead>
Expand Down
6 changes: 4 additions & 2 deletions maps/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,10 @@ main .title {
}

#table {
min-height: 652px;
&.reserve-height {
min-height: 652px;
& tbody { min-height: 622px; }
}

& thead {
max-height: 24px;
Expand All @@ -238,7 +241,6 @@ main .title {
}

& tbody {
min-height: 622px;
& tr > td:last-of-type { font-family: var(--fnt-mono); }
& tr:nth-of-type(odd) { backdrop-filter: brightness(0.9); }
}
Expand Down

0 comments on commit eb15eef

Please sign in to comment.