G
G
GoldenBro2021-06-25 12:09:59
css
GoldenBro, 2021-06-25 12:09:59

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: [],

How to change placeholderDestination: 'Choose destination' to placeholderDestination: 'last,

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
ParaBellum577, 2021-06-25
@GoldenBro

Change hands) And what actually does not work?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question