Created
May 10, 2018 14:44
-
-
Save TheMapSmith/203a2fca7e24e3f34684e3ebe8b266a7 to your computer and use it in GitHub Desktop.
Culverts Inspected in 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Culverts Inspected - 2018</title> | |
</head> | |
<body> | |
<div class="stats"> | |
<h1>Culverts Inspected in 2018:</h1> | |
<h1 id="2018-count"></h1> | |
</div> | |
<!-- require polyfills for fetch and Promise from https://polyfill.io --> | |
<script src="https://cdn.polyfill.io/v2/polyfill.js?features=es5,Promise,fetch"></script> | |
<!-- require ArcGIS REST JS libraries from https://unpkg.com --> | |
<script src="https://unpkg.com/@esri/[email protected]/dist/umd/arcgis-rest-request.umd.js"></script> | |
<script> | |
const featureQueryUrl = 'https://maps.vtrans.vermont.gov/arcgis/rest/services/AMP/Asset_SmallCulvertInventory_Data/FeatureServer/0/query?where=LAST_INSPECTION_DATE+%3E+timestamp+%272018-01-01+00%3A00%3A00%27&returnCountOnly=true' | |
// when including ArcGIS REST JS all exports are available from an arcgisRest global | |
arcgisRest.request(featureQueryUrl).then(response => { | |
console.log(response); | |
document.getElementById("2018-count").innerHTML = response.count | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment