Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Google Maps from SQL table

Posted on 2011-05-11
Medium Priority
Last Modified: 2012-05-11
I am using ASP.NET with C#

I am looking to insert a Google Map onto my web site... I'd like the map to plot points on the map that come from a MS SQL table.  The table will have address, city, state, zip, etc.... from what I'm ready, this will need to be converted to lat/long?  Are there any examples out there or articles/blogs that start you from the beginning and walk you through this process from beginning to end? (Plugging to Google Map API + converting to lat/long + dynamically grabbing data)

Question by:geoffsweb
LVL 23

Expert Comment

ID: 35741023
I suggest using the Google Maps JavaScript API.

JavaScript API Main Page

JavaScript API Tutorial

The process of converting an address to Lat/Lng is called Geocoding, which is supported by the JavaScript API.  More details here:

I hope this helps.
LVL 10

Expert Comment

ID: 35741048
and just f.y.i., with the API, you don't need to convert to Lat-Lng manually... the API has a function for it (it's like searching in google map directly), which returns lat-lng coordinates, or a @not found@ error code, for the searched location. However, this comes at a cost... a lot of overhead.

For example, i was loading about 300 points on my map, all from locations. With the function to convert location through API, it might have taken about 30-40 seconds to load the map... but then i created a table a stored all the lat-lng coordinates in there, and loading directly from lat-lng took at most 2 seconds to load all 300.

i've implemented this before, and it's easy to use, but again, at a cost... see every time you call the function to convert, it makes a call to the google servers, and comes back... so... f.y.i.

Author Comment

ID: 35777419
Thanks for the suggestions.  I was hoping to find smoething other than the Google documents.  I prefer reading somebody elses blog/tutorial/article that has simplified the process and gives examples of what to do and what not to do.
LVL 83

Accepted Solution

CodeCruiser earned 2000 total points
ID: 35777649

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question