1

How to create such a info windows using google distance matrix API in Android? Should I consume json response? enter image description here

IntoTheDeep
  • 4,027
  • 15
  • 39
  • 84
  • 1
    Isnt this just using Google's distance API, adding a polyline and then adding info to the polyline's infoWindow? I believe that's how you do it – selten98 May 17 '16 at 13:20

1 Answers1

0

Google Maps Distance Matrix API is a service that provides travel distance and time for a matrix of origins and destinations, based on the recommended route between start and end points.

So if you want to place info window, you need to use another API which is Google Maps JavaScript API.

An InfoWindow displays content (usually text or images) in a popup window above the map, at a given location. The info window has a content area and a tapered stem. The tip of the stem is attached to a specified location on the map.

The InfoWindow constructor takes an InfoWindowOptions object literal, which specifies the initial parameters for displaying the info window.

The InfoWindowOptions object literal contains the following fields: position which ontains the LatLng at which this info window is anchored. Note: An InfoWindow may be attached either to a Marker object (in which case its position is based on the marker's location) or on the map itself at a specified LatLng. Opening an info window on a marker will automatically update the position.

Check this SO question for more information.

Community
  • 1
  • 1
KENdi
  • 7,576
  • 2
  • 16
  • 31