4

I have a question that I can't seem to find the solution to. I'm no stranger to the Google Maps API and have coded maps and driving direction pages with it in the past. The issue I'm always running into is not having the place name returned in the results for the origin, destination, or any waypoints. The directions come back arranged the way I set them but the addresses are always "formatted" and not hot the directions (with place names) I send.

So my question is this: Is there any way to preserve the place name so that it displays in the address on the directions pane?

Example: Data sent: "John Smith, 570 Washington Street, Nowhere, TN 33002" Data returned: "570 N Washington Street, Nowhere, TN 33002, USA"

No name or identifier, just the address. Any pointing in the right direction would be greatly appreciated. . . And please don't send mail to John Smith now... he hates that.

Uyghur Lives Matter
  • 18,820
  • 42
  • 108
  • 144

1 Answers1

0

What you need to do is:

1) suppress the directionsDisplay generated markers & info window (which holds the address)

2) Place your own markers & info windows

To complete 1) - you need to:

directionsDisplay = new m.DirectionsRenderer({supressMarkers: true,
suppressInfoWindows: true});

for 2) - you should simple create a marker as usual.

eamo
  • 355
  • 4
  • 14