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 and Web Dev

Options
  • 06-10-2011 2:22pm
    #1
    Registered Users Posts: 17,965 ✭✭✭✭


    Haven't looked into it yet, but I'm sure someone on here will have an answer, I'm looking into doing a website embedding Google Maps into it using the API, I'm just wondering if I done this, can I put markers on certain places on the map within the site?
    Cheers.


Comments

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


    Yep!
    var gLatLng = new google.maps.LatLng(52, -6);
    var myOptions = {
         zoom: 12,
         mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("Map"), myOptions);
    map.setCenter(gLatLng);
    new google.maps.Marker({
          position: gLatLng,
          map: map,
          title: 'My Marker'
    });
    

    You can create additional markers by
    var myNewLatLng = new google.maps.LatLng(50,0);
    new google.maps.Marker({
          position: myNewLatLng,
          map: map,
          title: 'My New Marker'
    });
    


  • Registered Users Posts: 17,965 ✭✭✭✭Gavin "shels"


    Cheers, do you have any useful links? It's for a college project, but I'm want to have it fully researched before I go out of my depth.:D


  • Registered Users Posts: 3,140 ✭✭✭ocallagh


    Google have pretty decent documentation on their Maps Apis. You'll probably want Maps Javascript Api version 3


  • Registered Users Posts: 33 frezzabelle


    Have a look at GWT. It gives you the use of map lib's plus no java script, all java widgets which get compiled into js. Useful if you come from a java background. Good luck.


Advertisement