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 - how to specify starting point

Options
  • 22-03-2006 12:14pm
    #1
    Registered Users Posts: 6,511 ✭✭✭


    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 Posts: 6,511 ✭✭✭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 Posts: 21,257 ✭✭✭✭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