Latitude / Longitude values of a street

295 views
Skip to first unread message

Công Ty Phần Mềm Hoàn Hảo http://www.perfect.com.vn _

unread,
Dec 1, 2011, 2:55:45 AM12/1/11
to google-map...@googlegroups.com
I want to get Latitude & Longitude of a street, or highlights a part of a street from point A to B

EX: I want to get Latitude & Longitude of a street (like 

(10.540244,106.408301),
(10.541668,106.406906),
(10.546409,106.380669),
(10.553982,106.368749),

How can I do it? 

Rossko

unread,
Dec 1, 2011, 5:30:10 AM12/1/11
to Google Maps JavaScript API v3
> I want to get Latitude & Longitude of a street

There are an infinite number of lat-long pairs associated with any
street.

> EX: I want to get Latitude & Longitude of a street (like
>
> (10.540244,106.408301),
> (10.541668,106.406906),
> (10.546409,106.380669),
> (10.553982,106.368749),

Getting Directions from one end of then street to the other won't
always work, not all streets are two-way thoroughfares. You'd still
have the difficulty of determining the end points as well.

I think you may be able to get the data from OpenStreetMap, then you
could just draw a polyline on the map.

geoco...@gmail.com

unread,
Dec 1, 2011, 8:18:32 AM12/1/11
to Google Maps JavaScript API v3
On Nov 30, 11:55 pm, Công Ty Phần Mềm Hoàn Hảo http://www.perfect.com.vn


You mean something like this (v2 example, I haven't ported this tool
to v3 yet)?
http://www.geocodezip.com/example_geo2.asp?addr1=(10.540244,106.408301)&addr2=(10.553982,106.368749)&geocode=1&geocode=2

If you click on the "get polyline xml" button, it will show the
coordinates of the resulting polyline.

It uses the directions service, so will be limited by the usual rate
limits and quotas (don't try to dynamically do this for more than a
few roads at a time), and the result _must_ be shown on a google map
per the terms of use. Also consider Rossko's input (using walking
directions sometimes addresses issues with one way streets)

-- Larry

Shahzeb Farooq Chohan

unread,
Apr 23, 2012, 6:53:42 AM4/23/12
to google-map...@googlegroups.com
while searching for the same issue and found the solution here.
Reply all
Reply to author
Forward
0 new messages