Skip to content

Instantly share code, notes, and snippets.

@peterbsmyth
Created January 3, 2024 18:58
Show Gist options
  • Save peterbsmyth/cc04d7f3f19a06a27be9dbeee0362c3b to your computer and use it in GitHub Desktop.
Save peterbsmyth/cc04d7f3f19a06a27be9dbeee0362c3b to your computer and use it in GitHub Desktop.
export async function search(term: string) {
const response = await fetch(
'https://services6.arcgis.com/bdPqSfflsdgFRVVM/arcgis/rest/services/Trash_Day_Schedule/FeatureServer/2/query?where=StName%20%3D%20%27' +
term +
'%27&outFields=*&outSR=4326&f=json'
);
const data = await response.json()
return data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment