Skip to main content
100%

FOAM API Example - Custom Basemap

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

This example demonstrates a custom basemap built with Mapbox GL JS, using a personalized style from the Mapbox API to render a tilted, rotated map view centered on Connecticut. It shows how to handle hover interactions by querying features from a specific layer called “beacons” and displaying a tooltip with the feature’s properties. The code initializes a map with a custom style URL, sets zoom and pitch constraints, and attaches a mousemove event listener that uses `map.featuresAt` to detect nearby features. No external data source is loaded; the basemap and beacons come from the Mapbox style.

AI-generated description

Built with blockbuilder.org

mit Licensed

Similar vizzes