0

I build the application for car pooling, in which i have used Google map to search the ride. Every thing is working fine expect one strange thing is happening when i am searching for a address in Google map, official site is showing marker at some different location For Example:-

suppose i am searching for:" Manhattan Associates India Dev Center, EPIP Zone, Bangalore, Karnataka, India"

official site is showing marker at the correct location but in my site it is showing marker at some different place,I inspect the response of the route request using console.log in which start address is coming as "EPIP Zone, Bangalore, Karnataka, India" . I don't know why complete address is not coming.Please help me for this strange thing.

j0k
  • 22,600
  • 28
  • 79
  • 90
user1996823
  • 579
  • 1
  • 4
  • 10
  • Take a look at this: http://stackoverflow.com/questions/14724672/google-map-and-api-shows-different-results/14730073#14730073 – Dr.Molle Feb 07 '13 at 11:12

1 Answers1

0

Google Maps shows 2 results for that query (and provides 8 additional matches...)

That location is in the Places database.

But as there is no "address" the geocoder can't find it. You can use the geographic coordinates from the Places result.

geocodezip
  • 158,664
  • 13
  • 220
  • 245
  • Thanks for the response.... i agree with your point that Google maps is showing two result but what about the below address "iGATE Global Solutions Limited, EPIP Zone, Bangalore, Karnataka, India " for this location response is showing EPIP Zone, Bangalore, Karnataka, India (12.97654,77.72521000000006) but if you will search same address in google map it will show you some different location – user1996823 Feb 08 '13 at 02:52
  • That [result shown on Google Maps](https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=iGATE+Global+Solutions+Limited,+EPIP+Zone,+Bangalore,+Karnataka,+India&sll=12.967323,77.734432&sspn=0.064739,0.111494&vpsrc=0&ie=UTF8&hq=iGATE+Global+Solutions+Limited,&hnear=EPIP+Zone,+Bangalore,+Bengaluru+Urban,+Karnataka,+India&t=m&z=16) is also a result from [Places](http://www.geocodezip.com/v3_GoogleEx_places-searchboxC.html?q=iGATE%20Global%20Solutions%20Limited,%20EPIP%20Zone,%20Bangalore,%20Karnataka,%20India), not from the Geocoder. – geocodezip Feb 08 '13 at 02:57
  • can u please give me some example to understand this thing because as per my understanding you are asking me to use Geocoder first to get the latlong and then pass those latlong to the request of DirectionsService. Correct me if i am wrong. – user1996823 Feb 08 '13 at 05:35
  • No. The geocoder doesn't work for those locations, you need to use the Places API to get the geographic coordinates, then pass the geographic coordinates (as google.maps.LatLng objects) into the DirectionsService. – geocodezip Feb 08 '13 at 05:52
  • your quick response is really Appreciated. Now i have one more doubt i got your point why i not getting proper location but while drawing the route over Google map offical site from "BTM 2nd Stage, BTM Layout 2nd Stage, Bangalore, Karnataka, India" to "Manhattan Associates India Dev Center, EPIP Zone, Bangalore, Karnataka, India" it is showing me exact location of both source and destination. But when i am searching the same in my application, autocomplete is suggesting both location but while plotting over the map it is plotting different route(click of marker it is showing correct address) – user1996823 Feb 08 '13 at 06:25