You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
Hi,
i am facing the problem in updating the direction path which is plotted by the call of direction api using setOrigin and SetDestination in mapbox.js, now the problem is that how can i update the direction path when the origin's lat and lan getting changed at a interval of 15 sec.
The below is the javascript code to implement the direction api,so know when the orgin lat and lng changes ,how can i updated the direction path in the below code.
Hi,
i am facing the problem in updating the direction path which is plotted by the call of direction api using setOrigin and SetDestination in mapbox.js, now the problem is that how can i update the direction path when the origin's lat and lan getting changed at a interval of 15 sec.
The below is the javascript code to implement the direction api,so know when the orgin lat and lng changes ,how can i updated the direction path in the below code.
L.mapbox.accessToken = 'pk.eyJ1IjoiY2hhbmRydWRlbGlmb3JjZSIsImEiOiJjamMyMXkxdHYwYTlkMzNtd3MydWcwYXhlIn0.QVVhxj5S-dnI89ZXjaUJtA';
var map = L.mapbox.map('map', 'mapbox.streets', {
center: [12.971599,77.594566],
zoom: 13
});
var originFit = L.latLng(13.023008,77.726822),
destinationFit = L.latLng(12.989100,77.726822),
bounds = L.latLngBounds(destinationFit,originFit);
map.fitBounds(bounds);
The below is the html code,
<script src='https://api.mapbox.com/mapbox.js/v3.1.1/mapbox.js'></script> <script src='https://api.mapbox.com/mapbox.js/plugins/mapbox-directions.js/v0.4.0/mapbox.directions.js'></script>Kindly provide me the solution ASAP ,thank u in advance.
The text was updated successfully, but these errors were encountered: