As I am typing autocomplete address using http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=** I would like to prioritize within that city any address that begins with the following name .For ex: if I type mount and priority is California then it should give back Mountain view as the recommendation answer.How do I do that .I really appreciate any help.PLease let me know with respect to the above api call.Thanks in advance.
See https://developers.google.com/maps/documentation/geocoding/#Viewports
The short of it is that you can add a 'bounds' parameter that specifies lat-lng points to hint to the geocoder that you wish to look within a particular area. An example from that page is:
http://maps.googleapis.com/maps/api/geocode/json?address=Winnetka&bounds=34.172684,-118.604794|34.236144,-118.500938&sensor=false
Related
From Play Text Delegated function I am getting text to speak when where plat text triggered from Here maps, But I want to call Play-text on my own so I need to text speak.Can we get this list before navigation?
Please find image for better understanding.
Route With Directions
There is no such API in mSDK. But all needed information exists (in the class Maneuver - type of maneuver, direction, street name). You can obtain the list of maneuvers and generate needed text.
Occasionally when calculating a route it seems the vehicle ends being directed to the wrong side of the street.
I realize we can specify pass through waypoints before the final destination. This really isn't an option for us since we don't know from which direction the vehicle will be coming from.
Is there an alternative way to do this?
EDIT: I was told the issue occurred with these two lat/lons.
Start Location: 42.343763, -71.115977
End Location: 42.342545, -71.121875
EDIT: removed fragment sentence.
You can use NavigationWaypointParameter with LinkPositions to set a direction you want to drive through a certain waypoint. For example:
https://route.api.here.com/routing/7.2/calculateroute.json?
app_code={app_code}
&app_id={app_id}
&mode=fastest;car
&waypoint0=link!-22020941
&waypoint1=link!-948669856
This should give you the route you are looking for, with the bus heading towards the south-east with the destination on its right.
You can change the direction of the link traversal by changing it's prefix. For example, changing -948669856 to +948669856 gives you the original, shorter route, with the bus heading north-west and the destination on the left side of the road.
Note that you can get the link ids through reverse geocoding using the Geocoder API. The link id is the <ReferenceID> under <MapReference> in the <Result>.
In Android's Geocoder, method getFromLocation can return more than one address for a given lat long. But lat long uniquely represents a location on earth surface, so why does it return multiple objects?
Reverse geocoding translates latitude, longitude into a human-readable address. However, there are different objects that you may be interested in. For example, you can search the nearest street address, the nearest postal code, the neighborhood, the city, etc. For this reason reverse geocoder returns more than one result.
Please look at this example in the Geocoder tool.
As you can see the first result has a type street_address, the second result has a type bus_station, the third has a type neighborhood, and so on until the country level.
Hope my answer addresses your doubts.
Because a lat long position might not have a proper name, or it might refer to different names altogether.
Let's say, it points to the exact center of a square of undeveloped land, surrounded by 4 streets.
Depending on a country's rules & regulations, the owner of the land might be forced to 'attach' that piece of land to one of the 4 streets... or the land might be 'address-less' (only defined by its boundaries). In the latter case, the land might be attached to all 4 streets, allowing future purchaser/developer to choose the most 'catchy' address.
Or, a building just got renamed. For awhile, people won't recognize the new name. It's just wiser for reverse geocoding to return both the old name and the new name.
Another possibility is for the reverse geocoding to return "defined" names within X meters around the lat long position.
I'm going nuts on this one. I used Places Autocomplete before and that worked like a charm. e.g: https://maps.googleapis.com/maps/api/place/autocomplete/json?sensor=false&location=53.6020,53.6020&input=mcdonalds&key=
Now I'm trying to use the search in a range of 1000m of the users location, but I keep getting ZERO RESULTS. Can someone see, what I can't?
https://maps.googleapis.com/maps/api/place/search/json?location=53.6020,53.6020&radius=1000&keyword=mcdonalds&sensor=false&key=
Thanx in advice!
You have to specify a type of search in your URL (i.e. /nearbysearch/, /textsearch/, etc)
try this:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=53.6020,53.6020&radius=1000&keyword=mcdonalds&sensor=false&key=
Also, don't forget to append your API key to the URL :)
Lastly, for debugging purposes, try to use a different latitude,longitude coordinate and see if that works (i.e. use the lat/lng for New York City).
I have an question that while using Google Direction Api we can get the list of data like city's name, its Lat & Lng etc but the data provided by Api is limited to some extend. It's not able to provide all cities coming with-in that particular route.
E.g. If we try to go for Chandigarh to Delhi, then the route has a fixed result but when we try to reverse that same search i.e. Delhi to Chandigarh, some of the cities coming in previous result get vanished in api's new result, moreover, we just have a limited amount of locations/cities in result while we need the route completely detailed.
Do any of you guys faced this issue before? Is there any other way to match such requirement?
Hope I am understandable.
Thanks.
Use the below url:
https://maps.googleapis.com/maps/api/directions/json?origin="latvalue","longvalue"&destination="destnLat","destnLong"
&sensor=false&avoid=highways&mode=driving&alternatives=true
you have to set the alternatives value to true so it will result different routes available between the source and destination