map-directions

MKMapView Route/Directions

ε祈祈猫儿з 提交于 2019-12-20 08:32:43
问题 I found that the Google Maps API supports Directions through: var map; var directionsPanel; var directions; function initialize() { map = new GMap2(document.getElementById("map_canvas")); directionsPanel = document.getElementById("my_textual_div"); map.setCenter(new GLatLng(49.496675,-102.65625), 3); directions = new GDirections(map, directionsPanel); directions.load("from: 500 Memorial Drive, Cambridge, MA to: 4 Yawkey Way, Boston, MA 02215 (Fenway Park)"); } So how can this be translated

Can I restrict Google Direction API to iOS apps only?

懵懂的女人 提交于 2019-12-20 00:49:43
问题 I've been using Google Directions API for my iOS app, but now I want to restrict the API key to be used by my iOS apps (specified by their bundle IDs) only. Is there any solution for this? Thanks 回答1: Directions API is a web service. The restrictions that will work with an API keys for web services are IP restrictions. It is supposed that web services requests are executed on your backend servers. If you need to restrict an API key, the workaround is to create an intermediate server. Your iOS

Snap to Roads Android

断了今生、忘了曾经 提交于 2019-12-18 05:06:36
问题 I'm writing an Android app and I need the ability to take a lat/long value and find the lat/long value of the nearest road to it. I've read the article at http://econym.org.uk/gmap/snap.htm, and tried to implement this, but I've had to use the Google Maps Webservices rather than javascript (since it's an android app). When I make a request like maps.google.com/maps/api/directions/xml?origin=52.0,0&destination=52.0,0&sensor=true it doesn't return me the closest road at all! Seems that the

Displaying results of google direction web service without using javascript api

徘徊边缘 提交于 2019-12-18 04:54:32
问题 I am developing a application which will find direction between 2 points, display it on the google map and store it in server side so that I can render it again when needed also to compare one route to another route. I have successfully used the google maps api web serivce to find the route and a I have also used the google maps javascript v3 to find the route and display it on the map using DirectionsRenderer. Both of these services return similar JSON with the difference in the name of

android get duration from maps.google.com directions

回眸只為那壹抹淺笑 提交于 2019-12-17 20:34:17
问题 At the moment I am using this code to inquire google maps for directions from an address to another one, then I simply draw it on a mapview from its GeometryCollection. But yet this isn't enough I need also to extract the total expected duration from the kml. can someone give a little sample code to help me? thanks StringBuilder urlString = new StringBuilder(); urlString.append("http://maps.google.com/maps?f=d&hl=en"); urlString.append("&saddr=");//from urlString.append( Double.toString(

Google Maps Roads API returns duplicate coordinates and placeIds

泄露秘密 提交于 2019-12-13 07:21:23
问题 I'm implementing google maps roads API to pick up the coordinates where I clicked on the roads. But it returns more than expected coordinates and placeids. Suppose I set a direction from place A to place B using directions API then I clicked some points (lets say 10 points) on the roads to draw the route. In response the roads API is returning more than 10 placeIds and coordinates where I need only 10. Here is the code. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery

Adding multiple directions requests together Google Maps API

霸气de小男生 提交于 2019-12-11 11:52:31
问题 I'm trying to get directions for a user provided origin and destination, while showing directions to a middle location for ALL travel modes (driving, walking, bicycling, transit). I have this coded using waypoints, but I just discovered that the Google Maps API doesn't support waypoints for public transit--as discussed in a previous question here. I'm having difficulty finding any examples for how to go about piecing together multiple directions requests without using waypoints. Is there a

how to change color of route in google map api after route is build

混江龙づ霸主 提交于 2019-12-10 15:26:26
问题 You will find many already answers showing how to build route with different colors on it how to change the color of route in google maps v3 I want to know how I can change the color once its already builded and rendered. I have many different routes showing on the map, but I want to show red color or darker color, if this direction point is active and change other route colors to gray, until one of them are active. code: var directionsDisplay; var directionsService = new google.maps

Handling multiple routes with waypoints in Google Maps v3

折月煮酒 提交于 2019-12-08 04:42:52
问题 I want to display multiple directions with dragable waypoints and save each waypoints associating with origin, destination in object or database whenever Route.prototype.setWayPoints() is called. This guy is doing that with single route with dragable waypoints (and saving them in database) . http://vikku.info/programming/google-maps-v3/draggable-directions/saving-draggable-directions-saving-waypoints-google-directions-google-maps-v3.htm I want multiple routes not one. I googled a lot but

Voice navigation possible in google map api?

梦想与她 提交于 2019-12-07 06:26:57
问题 How to I activate voice based directions using google map api v3? I already implemented the maps which give directions from start to end points. But now I want to hear the name of my current location . Please help ? I have it implemented in ios UIWebView so I am getting the current location from GPS. Now I update it every 2 sec, but I wana add voice based directions. How is it possible? Please help 回答1: If you're using Google Directions API for receiving directions, you receive them in JSON