Social Networking :: Search Locate Addresses Using Google Maps Address Lookup
Apr 2, 2013
I have a scenario where user enters the address details in a textbox.If the address is ambiguous - say they enter an address with the text Springfield, which is the name of several cities across the US - I should be able to list the possible address in gridview. Clicking one of those addresses should allow the user to the results page (ShowStoreLocations.aspx ).
Refer this article [URL] ....
I tried to implement the code mentioned in the above article. Since i am using Asp.Net2.0 I cannot use linq in it.
The page is not redirecting to another tab...the address is opening in the current tab itself but i want the address of google map to be redirected in another tab.my code is
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
<markers> <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"/> </markers>
I want to caclate Latitude and Longitude from address in asp.net. 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;
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....
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();
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="http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places"></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") cn.Open() Dim cmd1 As OleDb.OleDbCommand Dim sqlconnection1 As String
[Code] .....
For reference, here is the explanation of the full API Code: [URL] ....