-1

I have a ton of markers in a city. When I do a search by address, I am able to retrieve the markers around that location. But I want to go a little bit further and enter only a street name and retrieve all markers located on that street. My problem is that I don't know how to retrieve the shape coordinates of a street (for example : north east, north west, south east, south west coordinates on a simple straight street, but could have more coordinates depending on the shape of the street).

Does someone know how to do it?

Thanks a lot in advance.

1 Answers1

0

I think you are trying to draw a polygon. If so, you can first gather the coordinates of your markers into an array and user that array to draw a polygon shape.

For more information about how to draw a polygon shape, you visit this: https://developers.google.com/maps/documentation/javascript/shapes#polygons

Or you can see the visual example: https://developers.google.com/maps/documentation/javascript/examples/polygon-arrays

Also there is a draggable example: https://stackoverflow.com/a/26241774/4195406

Community
  • 1
  • 1
ztan
  • 6,861
  • 2
  • 24
  • 44
  • Well... not really. in fact, i know how to draw a polygon... my problem is detecting a polygon around a street... like, how to automatically detect upper, lower, left, right coordinate of a street.. the other parts, i already know how. – Serge Munger Jan 08 '15 at 22:37
  • I dont think there is no Google API to retrieve multiple coordinates of a location, unless you supply multiple locations. What if a street is just a straight lane, or a street is circular...then you can really have northeast or southeast. You can also read this answer: http://stackoverflow.com/a/10515516/4195406 see if it can give you some clues. – ztan Jan 08 '15 at 22:58