Skip to main content
100%

FOAM API Example - Leaflet

✓ Published0🌍 Public
WWill Carter
Last edited May 13, 2018
Created on Mar 22, 2018

This example demonstrates a live map of FOAM beacon locations using the Leaflet mapping library. It shows beacon positions as standard map markers within a bounding box around Denver, Colorado. The code queries the FOAM API with bounding box coordinates and an authorization token, then decodes each beacon's geohash value to latitude and longitude using the latlon-geohash library. Axios handles the HTTP request, while Leaflet initializes the map with a Stamen Terrain basemap and adds the decoded markers. The visualization highlights how geohash-encoded spatial data from a blockchain-based API can be translated into interactive geographic markers.

AI-generated description

FOAM API Example - Leaflet

mit Licensed

Similar vizzes