Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic map with covid vaccination sites #1

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
{%- seo -%}
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" crossorigin="" />
<!-- Make sure you put this AFTER Leaflet's CSS -->
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA==" crossorigin=""></script>

<!-- Load Esri Leaflet from CDN. it has no .css stylesheet of its own, only .js -->
<script src="https://unpkg.com/[email protected]/dist/esri-leaflet.js" integrity="sha512-K0Vddb4QdnVOAuPJBHkgrua+/A9Moyv8AQEWi0xndQ+fqbRfAFd47z4A9u1AW/spLO0gEaiE1z98PK1gl5mC5Q==" crossorigin=""></script>

{%- feed_meta -%}
{%- if site.analytics -%}
<!-- Matomo -->
Expand Down
13 changes: 13 additions & 0 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@
<h1 class="page-heading">{{ page.title }}</h1>
{% endif %}

<div id="mapid" style="height: 500px"></div>
{{ content }}

</div>
<script>

//create map with a view of the lower 48 states
var mymap = L.map('mapid').setView([39.198, -100.327], 4);

L.esri.basemapLayer('Streets').addTo(mymap);

L.esri.featureLayer({
url: 'https://services.arcgis.com/8ZpVMShClf8U8dae/arcgis/rest/services/Covid19_Vaccination_Locations/FeatureServer/0'
}).addTo(mymap);

</script>
2 changes: 2 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ Alaska

We are entirely volunteer-run and all our code is open source. If you want to help out, shoot us [an email][1]!

want to add your vaccination or testing site? [click here](https://arcg.is/10S1ib)

[1]: mailto:{{site.email}}