I'm attempting to use leaflet layers on a project using a mapbox GL JS map. Mapbox offers two different ways to instantiate a map, and all the leaflet examples are using the 'classic' Mapbox API. I've build a whole experience using the GL JS way (seemed to have more robust features and documentation):
map = new mapboxgl.Map({
container: 'map', // container id
style: videoStyle,
center: [-73.945360, 40.717533], // starting position
bearing: 90,
zoom: mapInitZoom // starting zoom
});
However, now that I need to use leaflet in order to get the distance from the center point, all of the leaflet documentation instantiates maps like this:
var mymap = L.map('mapid').setView([51.505, -0.09], 13);
Is there a way I can continue my project using the Mapbox GL JS API and leaflet combined? Can anyone direct me to an examples or parts of the API documentation where I can read about this?
Oh, and the reason I think I need leaflet is because I need to add image layers to my map like this reference diagram image: