It lets you select two cities, and calculates driving directions between those cities. How to view your custom Google Map on your phone using the Google Maps app. The route appears on the Google Map. } private void btnGoogle_Click(object sender, EventArgs e) { // Get the Google Maps URL with defult zoom. "@id": "", Author example: "Google Maps shows that it would take between 7 and 8 hours to drive from Nashville, TN to Santa Rosa Beach, FL (Google)." Showing Pixel and Tile Coordinates 3. For example, options for modifying a Zoom control are specified in the zoomControlOptions field. As you have seen, I used a static position to initially center the map. "@context": "", Example. "@type": "HoWToDirection", "@type": "HoWToTool", "text": "Scroll down to see the description of the way and detailed instructions. There is also an option of finding your current location and starting the journey from there." EXAMPLE: Google Maps with Directions in Zen This example uses the %DeepSee.Component.mapView component to display a Google map on a Zen Page. } The plugin will provide a step-by-step guide mentioning the points where you’ll have to turn and in what. ... For example, the first thing we need to do is to head east on Rajpath toward Rafi Ahmed Kidwai Marg and go like this for 0.9 km. A route is getting from an initial location to a specific destination. Enter coordinates to find a place. "item": . In the field below select the way of getting there: driving, bicycling, walking or transit. Find their location and start moving from there. The most important code is contained in the calculateRoute() function. This article introduced you to several new classes and properties from the Google Maps API. Its constructor takes no parameters, and it has just one method, route(), which calculates directions. Now, it’s time to put those pieces together into the final result, which is shown below. } To send someone directions in Google Maps, follow the steps below. { "item": This web service provides us with information for different transport modes, waypoints and traveling times. For getting directions between two points, you have to pass points BasicGeoposition to the SDK. Google Maps is a map service provided by Google that supports a wide variety of configuration settings. When you enter an address, select a map type, and click Google, the program uses the following code to display a map in the system’s default browser. "position": "3", Here they are: To give you a complete understanding of how it works, we’ll explain it with an example. On your computer, open Google Maps. Below is a list of directions to get to the place of destination. The previous section explained the key components of the demo. You can also try to avoid toll roads by setting the avoidTolls property to true. Hello to all, welcome to Now we’ll move on to the business logic behind the demo. "itemListElement": "text": "Click the button ‘Find Direction’ and enjoy the result. May 11, 2014: Changed URL to, changed "My+Location" to "Current+Location", and added example links. } The google.maps.DirectionsRequest object is used to set options that the route request must satisfy. As you learned in the previous article, the center property is required. I'm also a regular writer for several networks, speaker, and author of the books jQuery in Action, third edition and Instant jQuery Selectors. "email": [ { The possible values are bicycling, driving, walking, and transit (using the public transportation). The hints help to enter the correct and full location data. Since it’s a long way, we’ll go by car. May 12, 2014: Removed "/preview" from some of the snippets which broke the directions link on mobile devices. May 11, 2014: Changed URL to, changed "My+Location" to "Current+Location", and added example links. In the search box at the top, type your coordinates. { The first tap point in the map will be the source of the route and the second tap point in the map will be the destination of the route. See Obtaining a Google Maps API Key for details about this key. "name": "Wpmapspro plugin", Additionally, you can constrain the directions. With Google Maps Directions, you can get directions for driving, public transit, walking, or biking on Google Maps. { zoom: It specifies the zoom level for the map (try to experiment with the zoom level). Whenever you see multiple routes, the best route to your destination is blue. 1. Enter an end location. Localizing the Map 5.