Can't get transit directions in Japan - google-maps

Searching for directions from 35.443708,139.638026
to 35.689487,139.691706
yields results on Google Maps, however this query to the directions API does not:
https://maps.googleapis.com/maps/api/directions/json?sensor=true&departure_time=1350456190&destination=35.689487,139.691706&origin=35.443708,139.638026&mode=transit
Anyone have any ideas? It seems to be specific to Japan. You'll want to update the departure_time above to now if you're actually testing this.
I've filed this bug with Google, I'd rather find out it's something wrong with my query though: http://code.google.com/p/gmaps-api-issues/issues/detail?id=4498
Thanks for your help!

Unfortunately, if you look at this spreadsheet, you can see that driving, (and transit), directions are not available for Japan through the API.

Indeed : according to https://developers.google.com/maps/faq#transit_directions_countries
it's not available ...

Just an update, we investigated this recently and until now(Feb2015), it seems only driving and walking are available in japan using directions api
transit not available according to maps faq
biking not available according to maps coverage
I also tried using javascript Directions service. Travel modes TRANSIT and BIKING still does not work

Related

How to get list of states in a country through Google map API?

Is it at all possible. I had spent 5 hours researching and did not find a solution.
Does anyone knows anything?
That is not part of the Google Maps API v3. You can use the Natural Earth Data set in Fusion Tables to get that information. Here is an example displaying the provinces of Canada on a Google Map using FusionTablesLayer.
The Geonames geographical database is available for download free of charge under a creative commons attribution license has various data sets that may help. The one which suits your requirements is admin2Codes.txt
Pls check out the ISO-3166-2. It is an ISO standard based on country. You need not rely on Google Maps or any other webservice. It is available as a pure JSON file.

Google Maps API for Jersey/Guernsey?

My company is using the Google Maps API to power an installer locator for our product. All has been going fine up until now, when I've added installers on the Channel Islands (UK). Is there any way I can get the Google Maps API to recognize these locations for me?
The Channel Islands are editable in Google Mapmaker, which means you can fix most geocoding problems if you happen to know the right answer. Not all fixes will go live immediately, but they will eventually.
There isn't! Geolocation in the channel islands (as provided by google) is very patchy. It doesn't seem to recognize postcodes, for instance.
My company is based on Jersey. On our site, we geolocate a user, then place a marker on the map as to where we think they are. We set this marker to 'draggable', and allow the user to drag the marker to their location if its inaccurate. You can get info on how precisely you have located someone from the API - if its not good enough, you can give extra prompts to tell the user to locate themselves.
This isn't an ideal solution, but its important to have - geolocation services do not work accurately everywhere in the world.

Google geocoding inaccuracy (in Israel)

I'm trying to use Google Geocoding API, but i keep on getting a very inaccurate answer (off by 3.2 KM).
Here is an example:
http://maps.google.com/maps/api/geocode/json?sensor=true&address=Hava%27ad+Haleumi+21+Jerusalem
I get the coordinate 31.7857,35.2007.
Ff you look up "Hava'ad Haleumi 21 Jerusalem" in maps.google.com, you can see that the location is 3.2KM away from what Google Geocoding API gave me.
Does anyone know why this happens?
Thank you.
Actually, the Google Maps API does not support geocoding in Israel beyond city level, so your solution is to do what you did and finding an alternate geocoding service.
The reason you got the correct location when searching on maps.google.com is because the API uses a different provider than maps.google.com due to licensing issues.
Here is a spreadsheet detailing the coverage area for Google Maps.
It's possible to use waze.co.il instead of google:
Their JSON API is
http://www.waze.co.il/WAS/mozi?q=yourAddress&token=yourToken
(Also, as stated in this thread http://www.waze.co.il/forum/viewtopic.php?f=21&t=6113
reverse geocoding is a paid service.)
Take a look at the response. You are getting a partial match and the location type is approximate. If you look at the veiwport you will probably find that the location you are looking for falls within that viewport. *Edit - Actually it looks like it just matched to city - Jersulem in this case - which is why you are probably off by so far

How to handle inaccurate Google Maps locations?

When I type in addresses in Google maps for locations in Asia, quite a lot of them are off by more than 200 metres. For example, "blk 85 bedok north road, singapore" is off by more than 300 metres. While I don't expect Google Maps to be spot on every time, sometimes the error is too great for certain use cases. What options do I have to handle inaccurate Google Maps locations in a web app? The web app should let the user enter an address or postal code as part of an entry and I will geocode the address and store the lat-long.
You could use bing, yahoo's and google's Geo Location api's to find latitude and longitude for a location, average the results together and use the result. Thus, if they all agree, you still get a good location, but if they disagree you get the best approximation of all three.
You could even programmatically compare the results from each engine and throw out any that don't agree with the others (for instance, if bing and yahoo agree and google does not, you could throw out google).
Beyond that, if you have a collection of addresses you know to be wrong, you could simply store the correct longitude and latitude for those points, and override the results in those cases.
Of course, to get around this problem at all, you'll need to geocode the addresses, check their validity in some way (as described above), and plot them using their latitude and longitude.
You don't have any fixes for this really, you're at the mercy of the accuracy of google maps here. The important part is you don't know if the address in inaccurate when doing one search to the next, so nothing you can do to handle it.
You can post a topic here and google will see it and often respond as well: Google Maps Local Listing Forums. I'd open something there with some of your examples and hope they get more accurate...that's all you can do in this case.
There are always other alternatives as well, yahoo and bing have mapping APIs, but I have no idea how much better or worse off you'd be going that route.
The problem is not the lat/lng data, in fact, they are correct. The problem is that the geo coords of the map tiles of the public Google maps api are inaccurate. The maps at maps.google.com are provided by a different map provider than the map tiles used with the public Google Maps API that you can embed in your website, use in your own applications, etc.
Check my recent posting at Google Maps & apps with mapview have different current positions
Is the result out on maps.google.com as well as through the maps api?
If on google maps live site the result is accurate then you can do an ajax search to return the correct lon/lat.
I have used this when geocoding UK postcodes
Geocoding UK Postcodes with Google Map API
I tried to reply to the upper answer, but I am not qualified enough yet. Just be aware that whatever you're using for geocoding, sometimes has restrictions on the use of that data. For example, google's geocoding API isn't allowed to be used to display information retrieved anywhere but google maps. The same might be for the others, I don't know what your project is, but it's something to be aware of.

Streets Missing using Google Maps API

Does google maps api use an older verison of their maps? When I embed a map using google maps api, a ton of streets are missing, especially in Israel.
Check this out (this map has lots of detail and streets)
http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=israel&sll=37.0625,-95.677068&sspn=41.496446,93.076172&ie=UTF8&hq=&hnear=Israel&z=8
Yet the embedded map hee has very little detail on Israel and relatively no streets.
Goto google maps api example page and find israel. (I couldn't post a link cause this is my first post)
Its a licensing issue. GISrael won't sell Google a universal licence to redistribute the map imagery to other people's domains.
My answer is this is probably a real or perceived security issue for Israel, which makes it an incredible headache for anyone outside of the country to produce a useful map with google map tools. (I've tried to do a map of Jerusalem, a walking tour, and found it nearly impossible to do.)