Skip to main content
100%

FOAM API Example - Popup on hover

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

This example shows a dark-themed Mapbox GL map centered on New York City, displaying FOAM beacon data as magenta circles. On hover, a popup appears next to each circle, presenting details such as the beacon name, transaction hash, geohash, addresses, and exact coordinates. The map is built with Mapbox GL JS, using its `Popup` and `mouseenter` event for interaction. Data is fetched asynchronously from the FOAM API via Axios, then converted to GeoJSON and added as a circle layer. The visualization relies on Mapbox’s styling and the latlon-geohash library for geohash formatting.

AI-generated description

FOAM API Example - Popup on hover

mit Licensed

Similar vizzes