While I m trying to draw a route for multi locations using google Map API, the route not available for some locations so the google maps not returning the map. I got the same result while trying by using the lattitude and longitude. One such location is orchha in uttarpradesh India to Delhi.
Driving directions is not yet officially supported in India. See this spreadsheet of supported features by country, so you might expect some inconsistencies.
Despite that, some directions requests work in India, for example most individual towns in Uttar Pradesh work. Perhaps the problem is that the geocoded point for Uttar Pradesh happens to be at a very blank area of farmland with no roads nearby. There's a limit to how far from a road a location can be for GDirections to work.
Related
My small rural village considers installing tubes in the streets to build a renewable district heating network. To get an idea of the necessary tubing and to involve villagers, i thought about setting up a simple webapp, where villagers can enter their addresses to indicate interest.
I'd then use Geocode API to obtain coordinates where i can place a marker. I'd also use the Directions API to get directions to the local power station. These directions would be converted to Polylines and drawn on the map. I can then color them according to the amount of heat a specific branch needs to supply. And where Polylines intersect, i can reduce to one common Polyline and build a tree-structure.
As i am not that experienced with the Google Map API, is this approach correct? That is using
Geocode API to resolve addresses to locations
Directions API to get directions from location to power plan
Polylines to draw the tree-like-structure of the network
And hints and ideas are very welcome! Thanks.
I am surprised whether i am doing any wrong or not. When i am finding the distance between two locations on google maps say maps.google.co.uk and when i query their API i get different result. Am i missing somethng?
Origin:Hyde Park Corner Station, Knightsbridge, London, United Kingdom
Destination:The Ritz London, United Kingdom
Result: 1.2 miles
And when i am using api:
http://maps.googleapis.com/maps/api/directions/json?origin=Hyde%20Park%20Corner%20Station,%20Knightsbridge,%20London,%20United%20Kingdom&destination=The%20Ritz%20London,%20United%20Kingdom®ion=gb&sensor=false&alternatives=true&units=imperial
Result:4.3 miles or 5.0 miles etc.
Why is there so much of difference . Am i missing something.
There are significant differences between Google Maps and a service like directions(or geocoding)
Google Maps at first is an implementation of Google Places, and that's the issue here. The directions-service uses geocoding to resolve the addresses, while Google Maps uses the PlacesService.
When you draw the route using the directionsRenderer, you will see that there are different start-and end-locations.
But when you first request the PlacesService to get the coordinates of the places, and use these coordinates to request the directionsService, you will get a result near by the result of Google Maps(the duration may differ, because the directionsService by default will not return results depending on the current traffic)
When using the Google Places Autocomplete to return a "route" type, such as a street, I want to take that route and plot several markers along it on the map.
Example: Take the entire route of "Yonge Street, Toronto, ON, Canada" and place markers all along that street from the beginning to end.
Currently searching for "Yonge Street, Toronto, ON, Canada" returns a single Lat/Long point for the entire route.
This needs to be done in a way that doesn't involve me manually selecting each point as I need this to function for any Google "route" on the globe.
I am stumped as to way to do this using Google Maps API v3.. perhaps there is another service that can help me get the Lat/Long points I need which I can then feed to the Google Maps API?
What you are looking for is currently not possible with the Google Maps API v3. You could add an enhancement request to the issues list, but doesn't seem likely to happen.
The geocoder actually returns 3 points along the road for your query ("Yonge Street, Toronto, ON, Canada"). You can get the coordinates of the street using the directions service, but you have to manually find the start and end, and possibly walking directions, maybe even add waypoints. But you said you didn't want to do that...
I am working on an Web App, if the user enters a given location (Ex: Street, Address, Country) it should bring all the retail locations which are nearer to the given location and the user should have the ability to click and view the map of the resulted retail locations and get the directions of the locations. I have done some research on Google Maps API, but i am not sure how efficient will Google Maps API will have the ability to provide Latitude and Longitude of any rural location in India.(The API should also work for Mobile devices(Android and Iphone etc.))
Is there any alternatives other than Google Maps API which will accomplish the above task.
Yes far as I have known, Google Maps API is efficient when compared to any other API to find. Google Maps API had the information about all the Mandal Head Quarters in India, so does have the ability to provide Latitude and Longitude for any city's nearby.
I need to find points that define delimitations of neighbors from Chicago.
My question is: How can I find a list with latitudes/longitudes of all the points that delimit neighbors. For example:
Gold Coast from Chicago is a polygon with 6 points as seen on google map: http://maps.google.com/maps/ms?ie=UTF8&t=m&vpsrc=6&source=embed&oe=UTF8&msa=0&msid=206241844247425110008.0004b43f0262868b8037f
What is the best way to extract this points so I can draw poly-lines over google map with google API for specific neighbors?
Edited:
So with addresses, which you already have, you can create a Maps API site:
http://code.google.com/apis/maps/
and use the Geocoding API to get the latitude and longitude of each of the addresses.
Added: Seems based on your comment that you're looking for neighborhood boundary data. Google Maps doesn't provide that data. There are different venders that do, one I have heard of is the Zillow Neighborhood API. I have never used it so I don't know much about it.