Answer the question
In order to leave comments, you need to log in
How to change the var initialState parameter?
Please help, there is a div with id <div id="map"></div>
and a script for this id:
Connected script:
<script src=https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-directions/v4.0.2/mapbox-gl-directions.js></script>
var initialState = {
// Options set on initialization
api: 'https://api.mapbox.com/directions/v5/',
profile: 'mapbox/driving-traffic',
alternatives: false,
congestion: false,
unit: 'imperial',
flyTo: true,
placeholderOrigin: '123',
placeholderDestination: 'Choose destination',
zoom: 16,
language: 'en',
compile: null,
proximity: false,
styles: [],
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question