I am using javascript devextreme. I want to draw a line between 2 markers. (Not the route) But I was not successful. I need to draw 2 lines as in the example picture. Devextreme JS – How to draw a line between 2 markers?
$(() => {
const markerUrl = 'https://js.devexpress.com/Demos/WidgetsGallery/JSDemos/images/maps/map-marker.png';
const markersData = [{
location: [40.755833, -73.986389],
tooltip: {
text: 'Times Square',
},
}, {
location: '40.7825, -73.966111',
tooltip: {
text: 'Central Park',
},
}, {
location: { lat: 40.753889, lng: -73.981389 },
tooltip: {
text: 'Fifth Avenue',
},
}, {
location: 'Brooklyn Bridge,New York,NY',
tooltip: {
text: 'Brooklyn Bridge',
},
},
];
const mapWidget = $('#map').dxMap({
provider: 'bing',
apiKey: {
bing: 'Aq3LKP2BOmzWY47TZoT1YdieypN_rB6RY9FqBfx-MDCKjvvWBbT68R51xwbL-AqC',
},
zoom: 11,
height: 440,
width: '100%',
controls: true,
markerIconSrc: markerUrl,
markers: markersData,
}).dxMap('instance');
});