Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Google Maps Geocoding - JS API V3

  • 02-02-2012 12:16PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 42 Wild Rover


    Any Google Map experts??


  • Registered Users, Registered Users 2 Posts: 12,025 ✭✭✭✭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, Registered Users 2 Posts: 42 Wild Rover


    Good info, appreciate it


Advertisement