Google Maps from SQL table

Posted on 2011-05-11
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

    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

    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

    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


    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now