Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Google Maps Geocoding - JS API V3

Options
  • 02-02-2012 12:16pm
    #1
    Registered Users Posts: 42


    Guys,

    Looking for advice to batch geocode 100+ addresses in a database to display on Google Maps using Javascript API V3, I think I'm on the wrong path geocoding them on the fly because of the 'Query_Limit' errors.

    Thinking of pre-geocoding existing & any new addresses and storing the co-ordinates in the database ready for display. Anyone got advice on another way of doing it?

    It's for a .Net 3.5 website.

    Cheers!


Comments

  • Registered Users Posts: 42 Wild Rover


    Any Google Map experts??


  • Registered Users Posts: 11,979 ✭✭✭✭Giblet


    All you need is Lat + Lng to add markers if you need to, you can then add a marker to the map using the following. (You don't need to geocode then)
    var Latlng = new google.maps.LatLng(myLatitude, myLongitude);
    var myOptions = {
         zoom: 12,
         center:Latlng,
         mapTypeId: google.maps.MapTypeId.ROADMAP
    };            
    var map = new google.maps.Map(document.getElementById("GoogleMapContainer"), myOptions);            
    map.setCenter(Latlng);
    var myMarker = new google.maps.Marker({
                    position: Latlng,
                    map: map,
                    title: "Your Location"
    });
    var info = new google.maps.InfoWindow;
    info.setContent("<strong>Some Content</strong><br />Some other Content");
    info.open(map, myMarker);
    

    So I would imagine you would need a web service or something to pull a list of Latlngs + Address info to populate more markers from your database.
    This is how I do it for some of my sites, the user enters the location of some stores or whatever and some content and I pull it out and create the markers.


  • Registered Users Posts: 42 Wild Rover


    Good info, appreciate it


Advertisement