// my.json
// [30.60000, 50.470000]
<script>
fetch('my.json').then(r => r.json()).then(myJson => {
mapboxgl.accessToken = 'pk.eyJ1IjoiYWx0Y3RybCIsIm';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
center: myJson, // <-----------------
zoom: 12
});
// Create a default Marker and add it to the map.
var marker1 = new mapboxgl.Marker({ color: 'red'})
.setLngLat([30.60000, 50.470000]) // <-----------------
.addTo(map);
});
</script>