I am a beginner and don't know much about APIs. I want to make a web application for nearby restaurant search and a bunch of other unrelated stuff. I am using laravel framework. I have designed a custom map in MAPBOX. I cannot attach any code because I have not done anything except for a little bit of research. i have added links to MAP GL JS and the map displays fine. I want users to be able to add their location in text or turn their location services on. And the map should display food places in close vicinity to that location. I don't know if am being thorough enough as this is my second question. Any help that'll get me started is appreciated.
<div id='map' style='margin-top:10px;width: 100%; height: 90vh'></div>
Javascript
mapboxgl.accessToken = 'MYTOKEN';
var map = new mapboxgl.Map({
container: 'map', // container id
style: 'mapbox://styles/MYSTYLE',
center: [74.3587, 31.5204], // starting position
zoom: 14 // starting zoom
});
// Add zoom and rotation controls to the map.
map.addControl(new mapboxgl.NavigationControl());
map.addControl(
new MapboxDirections({
accessToken: mapboxgl.accessToken
}),
'top-left'
);
var map = new mapboxgl.Map({
container: 'map', // container id
style: 'mapbox://styles/hadia125/ckcjiyik542ig1iqnvfrjjexf',
center: [74.3587, 31.5204], // starting position
zoom: 14 // starting zoom
});
map.addControl(
new MapboxDirections({
accessToken: mapboxgl.accessToken
}),
'top-left'
);