I'm looking for some ways but I'm having a lot of difficulty ... I just need the information that is in "coordinates" and put it in a PHP
<script>
mapboxgl.accessToken = 'MY_KEY :3';
var client = new MapboxClient(mapboxgl.accessToken);
var address = 'white house';
var test = client.geocodeForward(address, function(err, data, res) {
var coordinates = data.features[0].center;
document.write(coordinates);
//console.log(coordinates);
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v10',
center: coordinates,
zoom: 14
});
new mapboxgl.Marker()
.setLngLat(coordinates)
.addTo(map);
});
</script>
</head>
<body>
<div id='map'></div>
</body>
A very simple example is this
<?php $coord = 'coordinates'; ?>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…