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

  • 06-10-2011 02:22PM
    #1
    Registered Users, Registered Users 2 Posts: 17,986 ✭✭✭✭


    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, Registered Users 2 Posts: 12,026 ✭✭✭✭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, Registered Users 2 Posts: 17,986 ✭✭✭✭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, Registered Users 2 Posts: 3,141 ✭✭✭ocallagh


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


  • Registered Users, Registered Users 2 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