Click here to Skip to main content
15,908,020 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Hi, I am trying to use a google map to display locations that exist in my database, but I don't how it should work. Could you please help me with this. I only know how to get the API key from google. Your help will me much appreciated. Thank you
Posted
Comments
Tom Marvolo Riddle 28-Dec-13 7:27am    
If you have any queries feel free to ask
Member 10215709 28-Dec-13 8:12am    
please do you know any example that could help me with this? I am kinda lost with this.
Tom Marvolo Riddle 28-Dec-13 8:20am    
Did you see the link1?It is an example or if you get stuck then explain bit more
Member 10215709 28-Dec-13 8:35am    
I saw the link 1, the problem is that how to know longitude and latitude of a specific location. I am making a real estate site which allows the user to see the search result in the map. I hope you got an idea. thank you

You have to store latitude and longitude of a specific location in Database.

please see this link:
http://www.aspsnippets.com/Articles/Show-Google-Maps-using-Latitude-and-Longitude-in-ASPNet.aspx[^]
and ex3 in this link:
Google Maps in HTML, ASP.NET, PHP, JSP etc. with ease[^]
 
Share this answer
 
use ajax object like
C#
xmlhttp.open("Get","https://www.google.com/maps/preview?q="+placename,true)
xmlhttp.send(null)
 xmlhttp.onreadystatechange = function () {
                    if (xmlhttp1.readyState == 4 ||xmlhttp.Status="ok") {
                           var x = xmlhttp.responseText;
                            document.getElementById("iframe").innerHTML=x;
                              }
                         }

No need of api and all other details related to javascript
 
Share this answer
 
v2
You can try GeoCoding API which converts searched addresses into Latitude and Longitude which ca be used to display the Marks in Google Maps. Check the link .

https://developers.google.com/maps/documentation/geocoding/[^]

Also Refer the below links on how to use the latitude and longitude to marked in google maps.

http://www.4guysfromrolla.com/articles/051910-1.aspx[^]

http://www.aspdotnet-suresh.com/2013/05/aspnet-show-multiple-markers-on-google.html[^]

Hope this helps...
 
Share this answer
 
v2
Comments
Member 13004974 11-Apr-17 12:03pm    
What if I want to use php instead of asp
JoCodes 11-Apr-17 12:51pm    
post a different question

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900