Social Networking :: Calculate Distance / Duration Of Travel And Draw (plot) Route On Google Maps V3

May 7, 2015

I have 2 texbox and button when i type the address on textboxes it generates 2 google map using google map api and it is working fine.

I need to know how can calculate the distance between 2 addresses?

View 1 Replies

Similar Messages:

Social Networking :: Google Maps V3 - Calculate Distance And Travel Duration Between Multiple Address Locations

May 7, 2015

Its relate to series of question again. I have datalist bind sql server whcih is fetching 3 address like

Address 1

Address 2

Address 3 

After data list I have textbox which is based address like "Based Address"

I have the below script which calculate distance between 2 textboxex.

I want to to calculate the distance between base textbox and address in datalist item so result will like this

Base Address Pune

Datalist address

Address 1 Bombay result distance between pune and bombay 200 Km

Address 1 Kolkota result distance between pune and kolkata 500 Km

//*********DISTANCE AND DURATION**********************//
var service = new google.maps.DistanceMatrixService();


View 1 Replies

Social Networking :: Google Maps API V3 - Calculate Distance And Plot Route Between Two Locations

May 7, 2015

I want to  create a google maps that it can Calculate Distance, Travel Duration, draw (plot) Route  between two locations and display Directions. Now I want to hide Directions Panel.

View 1 Replies

Social Networking :: Draw (Plot) Route Between User Location And Specified Location On Google Maps V3

May 7, 2015

Following is my code when user enters hospital name and city, he will be navigated to this page to show location on map. Now I want to get user current location and draw the route between current location and destination. Is there any way to integrate to geocoding and geolocation?  

<!DOCTYPE html>
<html xmlns="">
<head runat="server">
html, body, #map-canvas

[Code] ....

View 1 Replies

Social Networking :: Calculate Distance From Latitude And Longitude In Google Maps V3

Jan 8, 2014

I have variable as

var from_Lati = 19.132324234  // from latitude
var from_longi = 19.11233334  // from longitude

and I have TO latitude and Longitude in Array as

var To_Lati = [18.132323,18.90941,18.31232423]   // to latitude in array
var To_Longi = [18.2132123,18.242423,18.43243]   // to longitude in array

I have gone through many reference on internet but can't find the solution for calculating the distance with respect to array.. Now I want to find the distance between them using JavaScript...

View 1 Replies

Social Networking :: Google Maps V3 / How To Draw Route Between Two Locations (points)

Nov 14, 2013

I have 4 to 5 rows of latitude and longitude  now I want it to display in map showing the path (line on map)

example: I have this 

1> 12.32333232,20.334343542



now I want it to show on google map and drow lines based on the latitude and longi

View 1 Replies

Social Networking :: Google Maps Distance Calculator From Database

Mar 26, 2016

I used a Google Maps Distance Finder API that comes with two textboxes, one for the source, and one for the destination. It also comes with a button, that when clicked, will find the distance between the two locations using the funciton GetDistance(). The code before the function initializes the map. I created another button and used VB.Net to run SQL code first, and then to automatically populate the two textboxes, then I had it call the function GetDistance().

The issue I ran into is that the function won't calculate the distance, and the map never changes from its default state. I believe it's because it's not running the code that initializes the map. (I could be wrong) I have tried WebBrowser1, to call the click of the button, but I had to Inherit Forms, which I can't do, and I have also tried adding the top code into the GetDistance() function. Is it possible to call the initializing code before GetDistance()?

Here is the JS function code:

<script type="text/javascript" src=""></script>
<script type="text/javascript">
var source, destination;
var directionsDisplay;
var directionsService = new google.maps.DirectionsService();
google.maps.event.addDomListener(window, 'load', function () {

[Code] ....

Here is the VB Code I use to call the JS Function: 

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
Dim cn As New OleDb.OleDbConnection("Provider = Microsoft.ACE.OleDb.12.0;" & _
"Data Source=|DataDirectory|Address Database One Calculation.mdb")
Dim cmd1 As OleDb.OleDbCommand
Dim sqlconnection1 As String

[Code] .....

For reference, here is the explanation of the full API Code: [URL] ....

View 1 Replies

Social Networking :: Calculate Latitude And Longitude Using Address - Google Maps API V3

Feb 21, 2013

I want to caclate Latitude and Longitude from address in I have written the necessary code ,but could not get the desired result

I have put an alert and tested it.Its working fine until geocoder.geocode()function is called.Alert put inside the function is not working.It seems there is some issue with function.

This is my javascript function

function calculateCoordinates() {
var txtAddress1 = document.getElementById('<%= txtAddress1.ClientID%>');
var txtLatitude = document.getElementById('<%= txtLat.ClientID%');
var txtLongitude = document.getElementById('<%= txtLong.ClientID%>');
var address = txtAddress1.value;

[Code] ....

View 1 Replies

Social Networking :: Change Stroke Color Of The Direction Path (Route) In Google Maps V3

Nov 25, 2013

how to change the route color when drawing routes on Google Maps

View 1 Replies

Social Networking :: Google Map API - Get Distance In Miles Instead Of Kilometers (KM)

May 7, 2015

Following the series of question, this is the code as of now has been developed and working fine. Now need to make some more tweek with this

1. Instead of distance from source to destination in KM can we have it in Miles

2. I need to show the distance between source and destinace only if destination falls under 25 mile radius from source else need to show the label message that no record found.

Here is the code

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="sqlmap.aspx.cs" Inherits="sqlmap" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head runat="server">

[Code] ....

C# file
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

[Code] ....

View 1 Replies

Social Networking :: How To Use Google Maps

Oct 6, 2013

I want to use google map , which show the location, address

How to do this....?

View 1 Replies

Social Networking :: Google Route Map For A Ride

May 1, 2013

I'm trying to make a web application to create a google route map for a ride. In which I want to map the Marker places as a support station on given route how can I do this.

View 1 Replies

Social Networking :: How To Create Google Maps And Add To Website

Jul 6, 2013

How to create Google Site Map in

View 1 Replies

Social Networking :: How To Get Zip Code Of Address Using Google Maps API

May 7, 2015

how to find out zip code searching from address?

View 1 Replies

Social Networking :: Capture Google Maps To Image

Aug 18, 2015

capture Google mag image when map image is full loaded...

View 1 Replies

Social Networking :: Add Markers To Google Maps Using Address

May 7, 2015

I am looking for multi marker google map from sql server database, I have following code with me which is working perfectly fine but instead of fetching data from sql server it is fetching from xml. How can bind it from sql server to show multi marker.

xml data

<marker address="630 LAS GALLINAS, San Rafael CA"/>
<marker address="2ND ST, Novato CA"/>
<marker address="2402 SIR FRANCIS DRAKE BLVD, fairfax CA"/>

<marker address="255 CANAL ST, San Rafael CA"/>


View 1 Replies

Social Networking :: How To Fade (change) Some Regions On Google Maps

May 7, 2015

How to chnage the google map color only outside of the circle

like this [URL] .....

View 1 Replies

Social Networking :: Fill Values From Database In Google Maps

May 7, 2015

I need now load data (title, lat,lng,description) fill from database. Is it possible?

View 1 Replies

Social Networking :: Drag And Drop Markers In Google Maps V3

May 7, 2015

i have to display google map with movable pushins(marker).if we will drag these on anoother location and click the submit button than new lattitude nad longitude will be save in the database and updat also....

View 1 Replies

Social Networking :: How To Center Map As Per Marker Locations In Google Maps V3

May 2, 2013

I have wriiten the following code to avoid zoomout of the markers and to place the makers center to the map.

var bounds=new google.maps.LatLngBounds();map.fitBounds(bounds);map.setCenter(bounds.getCenter());

The above code is working correctly.But when i wrote setInterval function to drop the markers after a specific interval of time , the above piece of code is not working and the map is not getting displayed.This the code i have written

window.onload = function () {
var mapOptions = {
center: new google.maps.LatLng(markers[0].lat, markers[0].lng),
mapTypeId: google.maps.MapTypeId.ROADMAP
var infoWindow = new google.maps.InfoWindow();

[Code] ....

View 1 Replies

Social Networking :: How To Customize (change) Marker In Google Maps V3

Nov 21, 2013


how to change icon marker on google maps to custom shape with label ?

like [URL] website.

View 1 Replies

Social Networking :: How To Zoom Map When Marker Is Clicked In Google Maps V3

May 7, 2015

I am using the code below for google maps to show multiple markets and it works fine. but I am confused how to add the following...

If you click a marker and zoom it does not always stay in sync and you lose sight of the market...

View 1 Replies

Social Networking :: How To Change Marker Size In Google Maps V3

May 7, 2015

This my code but it is not showing difference How Would I change the size of the markers give me some syntaxs

var mapOptions1 = {
center: new google.maps.LatLng(-34.397, 150.644 ),
zoom: 5


View 1 Replies

Social Networking :: Display Markers From CSV File In Google Maps

Apr 10, 2014

Maps using only in Client side validation (Not using Asp.Net)

1) It must get the longitude and latitude from CSV file and it must be a fileupload and loads dynamically using Jquery.

2) Multiple markers showing different location.

View 1 Replies

Social Networking :: Google Maps - Close InfoWindow When Click Anywhere On Map

Mar 7, 2014

How can i close infowindom in google map when click out side the marker ...

View 1 Replies

Copyrights 2005-15, All rights reserved