Bing Maps Development Select Start and End points of a Route

LangdalePikes 1 Reputation point
2022-02-22T13:43:52.817+00:00

Using Bing Maps for a Touch screen Apple device, I am trying to select a 'From' Pin and a 'To' pin to get the start and end destinations for a route. When I click on a pin it displays an infoBox in which I have coded two <a> elements 'Directions From Here' and 'Directions To Here', each with a different id. I had hoped to fire of a function dependant upon which element I clicked, 'From' or 'To', and then use the 'target.getLocation()' to identify the end points of the route. Unfortunately, I am unable to click select 'From' or 'To' within the infoBox. Is there a way to do this?

//Set up info box metadata description

pin.metadata = {
description: '<table><tr><td><a id="from">Directions From Here</a></td></tr><tr><td><a id="to">Directions To Here</a></td></tr></table>'
};

//Display the infoBox when pin Clicked
function pushpinClicked(e) {
if (e.target.metadata) {
infobox.setOptions({
location: e.target.getLocation(),
title: e.target.metadata.title,
description: e.target.metadata.description,
visible: true
});
}
}

Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
255 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. IoTGirl 3,126 Reputation points Microsoft Employee
    2022-02-22T18:21:30.207+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.