Open a modal on a waypoint click in google maps

I have given my code below which shows waypoints on the google map!! When I click on the waypoint it shows the info window but I want to open a modal instead.. any hlp is appreciated.

    function calcRoute() {
 startingpointcity="${cities[0]}";
 startingpointstate="${states[0]}";
 firstwaypointcity="${cities[1]}";
 firstwaypointstate="${states[1]}";
 secondwaypointcity="${cities[2]}";
 secondwaypointstate="${states[2]}";
 startingbuilding="${buildings[0]}";
 firstbuilding="${buildings[1]}";
 secondbuilding="${buildings[2]}";
  console.log(firstwaypointcity+" "+secondwaypointcity);
  var request = {
    origin: startingbuilding+','+startingpointcity+','+startingpointstate,
    destination: startingbuilding+','+startingpointcity+','+ startingpointstate,
    waypoints:[{location: firstbuilding+','+ firstwaypointcity+','+firstwaypointstate}, {location:secondbuilding + ',' + secondwaypointcity+','+secondwaypointstate}],
    travelMode: google.maps.TravelMode.DRIVING
  };
  directionsService.route(request, function(response, status) {
    if (status == google.maps.DirectionsStatus.OK) {
      directionsDisplay.setDirections(response);
    }
  });

}![This is the Image as you can see I want to open a modal instead of the info window which it shows][1]


Source: jsp

Leave a Reply