Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Google Maps - how to specify starting point

  • 22-03-2006 12:14PM
    #1
    Registered Users, Registered Users 2 Posts: 6,753 ✭✭✭


    I wrote some Javascript to allow me to create a URL that would display a map and marker to a specified location. It's useful when telling a local authority the location of a broken traffic light or pothole.
    Unfortunately the URL is quite long.

    I've seen people make use of the Google Maps site to do something similar, but I can't remember where I saw this. Anyone know what GET parameters the site uses and how the coordinates are generated?


Comments

  • Closed Accounts Posts: 4,655 ✭✭✭Ph3n0m


    http://bluweb.com/us/chouser/gmapez/

    this what you are looking for?


  • Registered Users, Registered Users 2 Posts: 6,753 ✭✭✭daymobrew


    Thanks for the link. Via it I found YourGMap which has given be an idea. I'll store my links in a database and provide a shorter url to view them and include a caption for the marker.


  • Registered Users, Registered Users 2 Posts: 21,283 ✭✭✭✭Eoin


    daymobrew wrote:
    I wrote some Javascript to allow me to create a URL that would display a map and marker to a specified location. It's useful when telling a local authority the location of a broken traffic light or pothole.
    Unfortunately the URL is quite long.

    I've seen people make use of the Google Maps site to do something similar, but I can't remember where I saw this. Anyone know what GET parameters the site uses and how the coordinates are generated?

    Hi,

    I used google maps on my rugby club's website - the API is easy enough to use. Finding the starting point wasn't too bad, I just went to the google maps page and found the spot I wanted, and made it the centre of the map. I then clicked the "link to this page" link, and that gave me the URL with the coordinates.

    Then I just added them to the JavaScript that generates the map:
    // center the map:
    map.centerAndZoom(new GPoint(-6.139083,53.259617), 2);
    // add a marker:
    var point = new GPoint(-6.139083,53.259617);
    var marker = new GMarker(point);
    

    Eoin


Advertisement
Advertisement