driving-directions

How To Calculate Distance Between Two Points in Driving Direction Mode in Android

ⅰ亾dé卋堺 提交于 2019-12-11 05:36:56
问题 everyone... I have something to ask about using a MapView in Android with Google Maps API.. I've read about how to make a Geopoint or more and find a distance between 2 points.. One thing that still makes me confuse is about calculating a distance between 2 points. I've tried and find the result but it's applied if the condition is when I want to make a straight line between those points. But, when I crosscheck with maps.google.com, the result (distance) is different with the same latitude

google maps api works at localhost but doesn't work at web server

て烟熏妆下的殇ゞ 提交于 2019-12-11 03:18:40
问题 I used google maps api for selecting some points on map and find to shortest driving route. Everythings works in localhost, but when i publish and upload it server, it doesn't work... Why it's happen? There isn't any error. Map is coming on page but i can't see markers and directionResult doesn't load the result. Is it about authorization? I have valid account and api key etc. And i allowed referer of my domain. Edit: I check the script with crome JS debugger. There is no response here;

displaying route path names

丶灬走出姿态 提交于 2019-12-10 22:26:07
问题 //main activity in this class two errors shown below within the comments import android.graphics.Color; import android.os.Bundle; import com.google.android.maps.GeoPoint; import com.google.android.maps.MapActivity; import com.google.android.maps.MapView; public class NewroutepathActivity extends MapActivity { /** Called when the activity is first created. */ MapView mapView; private String US_API; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

Google Maps API - “road” distance between 2 points

▼魔方 西西 提交于 2019-12-10 12:15:32
问题 I have a website where "near locations" are shown for each item, based on the latitude and longitude coordinates stored in a database. Problem is that this calculated distance is the air-line distance, which differs a lot ferom the actual driving distance. Google Maps does only have a JavaScript API for driving directions by now, I need it as a web service API to make calls directly from the server. Is there any possibility to do this? 回答1: The Google Maps API has a HTTP service for geocoding

Directional arrow from source to destination driving directions

拟墨画扇 提交于 2019-12-10 11:52:06
问题 What I want : My app requires plotting driving directions from source to destination, which is done.My problem is I need a directional arrow pointing from source to destination. What have I done: I am able to draw an arrow, also I have calculated angle but don't know how to apply that angle to the code so that the arrow rotates... I have tried all code..nothing works,the arrow gets drawn at source but points in wrong direction. PS: I have tried this Direction between two GeoPoints in Google

Walking, bicycle and public transport directions with time required in each mode , iPhone

只谈情不闲聊 提交于 2019-12-10 10:15:07
问题 I am using following url to get driving directions between two locations. NSString* apiUrlStr = [NSString stringWithFormat:@"http://maps.google.com/maps?output=dragdir&saddr=%@&daddr=%@", saddr, daddr]; What changes need to be done in above query to get directions for bicycle, walking or public transport and corresponding distance, time required between two places? Thanks in advance for any help. 回答1: You must use the "dirflg=?" parameter, where "?" can be: dirflg Route type. dirflg=h

iOS driving directions in iOS6

岁酱吖の 提交于 2019-12-06 21:35:30
I have been searching all around about how to integrate driving directions into MKMapView within my application. Is the only way to open the Apple Maps program and go from there, or is their a way of integrating within your own app. If not, I will probably go with google maps as soon as I can get an API key. Paul Peelen If you mean getting the same views for driving direction (a.k.a. turn-by-turn navigation) as the Apple Maps application, then no... as far as I know, there is no library for that (if not 3rd party). However, as you mentioned, you can open apple maps or google maps giving the

Google Maps - Autocomplete & Directions API - trigger onchange() for dropdown list?

非 Y 不嫁゛ 提交于 2019-12-06 04:09:47
I have Google Map and two inputs. Both of them use autocomplete, like this: //first input autocomplete var input1 = (document.getElementById('start')); var autocomplete1 = new google.maps.places.Autocomplete(input1); autocomplete1.bindTo('bounds', map); //second input autocomplete var input2 = (document.getElementById('end')); var autocomplete2 = new google.maps.places.Autocomplete(input2); autocomplete2.bindTo('bounds', map); After I fill both of these inputs I'm displaying the shortest way betweeen them using Directions API: function calcRoute() { var start = document.getElementById("start")

Walking, bicycle and public transport directions with time required in each mode , iPhone

只愿长相守 提交于 2019-12-06 03:22:13
I am using following url to get driving directions between two locations. NSString* apiUrlStr = [NSString stringWithFormat:@"http://maps.google.com/maps?output=dragdir&saddr=%@&daddr=%@", saddr, daddr]; What changes need to be done in above query to get directions for bicycle, walking or public transport and corresponding distance, time required between two places? Thanks in advance for any help. viggio24 You must use the "dirflg=?" parameter, where "?" can be: dirflg Route type. dirflg=h Switches on "Avoid Highways" route finding mode. dirflg=t Switches on "Avoid Tolls" route finding mode.

Calculating the driving distance between two points using PHP only (Bing maps)

谁说胖子不能爱 提交于 2019-12-04 20:38:40
I'd like to work out the distance between two points. No map. No javascript. Just the distance. I understand Google maps prohibits this and it's against their terms of service. But Bing Maps doesn't have this restriction. I want to give the points in a general format, i.e "Cambridge" "Church Street, Newcastle" How would I go about doing it? As basic as possible. It's for a mobile device. 1.) Sign up for a Bing Maps key at http://www.bingmapsportal.com . A key is a alphanumeric string of around 64 characters in length, something like: AtGYpcoIpC5zy0P2k4Bc4839b-