SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    $books++ == true matsko's Avatar
    Join Date
    Sep 2004
    0 Post(s)
    0 Thread(s)

    Google Maps and Set Locations

    What I want to do is this: basically have a system where one user saves his/her address and if they choose to they can have their address displayed to their set friends to view where they live.

    As bizarre and far fetched as the idea sounds, it's just something I want to test out and not make public. So anyway my website would store the exact location of where the user lives and then would access google maps (in an iframe or ajax load) and simply provide the address and let google render the location of it. This all works fine with ONE address, you simply just enter it into the input or provide it through the google maps API.

    OK but how do I get google maps to display multiple addresses at once? All I want to have is say

    (123 fake street) Chicago - (456 john street) Chicago and have the google maps API display both on the map rendering.

    How do I do this?
    I can't believe I ate the whole thing

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Philadephia, PA
    1 Post(s)
    0 Thread(s)
    map.addOverlay(new GMarker(point1));
    map.addOverlay(new GMarker(point2));
    map.addOverlay(new GMarker(point3));
    Where point1, point2, and point3 are lat/lang or results from geocoding:


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts