locked
Google Maps RRS feed

  • Question

  • User571778043 posted

    I have a sql database with the name and addresses for some businesses.  These are listed in a GridView with a CheckBox on each row.  I want to be able to have a user check each business and then have each checked business show up on the Google Map at the same time.

    Where do I even start with this - I have received the Google Map key and looked at the documentation but don't understand what to do next.

    I'm using SQL Server 2008, .Net 3.5 C#.


    Thanks


    Thursday, February 11, 2010 1:29 PM

All replies

  • User-863835478 posted

    You said "I want to be able to have a user check each business and then have each checked business show up on the Google Map at the same time."

    How and where exactly do you want the map to show for each checkbox?

    Thursday, February 11, 2010 2:12 PM
  • User-1884396846 posted

    The google map documentation isn't very helpful.

    I have done something similiar (read addresses from a sharepoint list and supply them to a google map to show).

    I have a googlemap.js file that calls a parser page (aspx that outputs xml) and plots the info on a google map.
    This is hard to show without providing all the code.

     Here is the js function that does the mapping.

    // ===== Load Data File ======
        map.parseXML = function(data) {
            var markerList = [];
            var markers = data.getElementsByTagName('marker');

            for (var x = 0, xl = markers.length; x < xl; x++) {
                var marker = markers[x];
                var mtype = marker.getAttribute('type');

                var locale = {
                    type: mtype,
                    icon: icon.display(mtype),
                    location: marker.getAttribute('location'),
                    address: marker.getAttribute('address'),
                    phone: marker.getAttribute('phone'),
                    url: marker.getAttribute('url') || '',
                    lat: marker.getAttribute('lat'),
                    lng: marker.getAttribute('lng'),
                    id: marker.getAttribute('id')
                };
                markerList.include(locale);
            };
            map.markerList = markerList;
            // ===== Hide "You" marker =====
            map.params.startMarker = false;
            map.initLocation(map.params.lng + "," + map.params.lat);
            selectLocation = getQueryStringVal("selectedCountry");
            if (selectLocation != "") {
                setTimeout('moveToLocation()', 500);
                map.updateMap(selectLocation);
            }
        };

     

     

    Chris
    http://chrisbarba.wordpress.com

     

    Thursday, February 11, 2010 2:34 PM
  • User-1199946673 posted

    Where do I even start with this
     

    What about here?

    http://googlemap.codeplex.com/

    Thursday, February 11, 2010 3:11 PM