Google Maps JavaScript, fetch latitude and longtitude values of click location

Discussion in 'JavaScript' started by norfstar, Feb 23, 2007.

  1. #1
    A friend of mine has a non-commercial birdwatching website and has had the idea of allowing people to add locations that they have seen specific types of birds, which others will be able to see as marker icons on Google Maps.

    I'm fine with displaying the markers once I've got the longitude latitude, but JavaScript is not my stongest subject and I can't seem to work out if it's even possible with what the Google Maps API provides to write a script to fetch the longitude/latitude of a point on the map onclick (then populating two form fields on the page). Any ideas of whether this is doable or not?
     
    norfstar, Feb 23, 2007 IP
  2. DeViAnThans3

    DeViAnThans3 Peon

    Messages:
    785
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    0
    #2
    **edit** wrong information :)
    Maybe you could use this as study material, its a mod for phpBB.
    The last function in includes/gmap_lib.js by example shows how to put lagitude & longitude into a specific text box in a window which opened the google maps coordinates finder in a new popup window..

    hope this helps a bit lol - if you want me to help you further, i'm happy to do so :)
    lol i love birds too, so if you want, PM me the site link you're talking about :D
     
    DeViAnThans3, Feb 23, 2007 IP
  3. norfstar

    norfstar Peon

    Messages:
    1,154
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the link - will have a look through.

    The site hasn't been "launched" yet, but probably after I've worked this into it I it's pretty likely I'll get the go ahead unveil everything :).
     
    norfstar, Feb 23, 2007 IP
  4. DeViAnThans3

    DeViAnThans3 Peon

    Messages:
    785
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Haha, okay :)
    I'll patiently wait ;)

    If you got further questions, you can ask them lol. I'm not very into Google Maps, but I can understand things quite fast :)
     
    DeViAnThans3, Feb 23, 2007 IP