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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Google Maps and Web Dev

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


    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: 11,989 ✭✭✭✭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,974 ✭✭✭✭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