+ Reply to Thread
Results 1 to 8 of 8

Thread: Google Map manipulation

  1. #1
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    1,610

    Default Google Map manipulation

    If someone could point me in the right direction it would be greatly appreciated.

    I downloaded my google map api key and began to play around with some maps for my website. I have no problem creating the size of the map, pulling up coordinates and displaying these maps. But after trying for an hour I still can't set a simple red marker on a location.

    Great free coordinate tool http://www.infosports.com/m/map.htm

    My test site
    http://www.coastalmobile.com/google-map-test.html

    This is the code I have to create the map:
    var map = new GMap(document.getElementById("map"));
    map.addControl(new GSmallMapControl());

    map.centerAndZoom(new GPoint(-75.15223503112793, 38.622302334540215), 4);

    What do I add for a simple red dot in the middle?

    I tried the examples at google with no luck.

    btw, I saw some of your examples with custom icons rather than red dots. Very cool, I won't even ask how you made them. For now I'd be thrilled with simple red dots.
    Coastal Delaware Real Estate Sales
    REHOBOTH BEACH CONDOS | REHOBOTH BEACH REAL ESTATE | REHOBOTH BEACH MOBILE HOMES
    * Results not typical. Individual results may vary.

  2. #2
    Join Date
    Jan 2005
    Posts
    126

    Default Re: Google Map manipulation

    Try this, change the coordinates from 00.00 to where you want the marker to go & change the 'marker text' to the description you want on the marker:

    <script type="text/javascript">
    //<![CDATA[

    function createMarker(point, number) {
    var marker = new GMarker(point);

    // Show this marker's index in the info window when it is clicked.
    var html = "" + number + "";
    GEvent.addListener(marker, 'click', function() {
    marker.openInfoWindowHtml(html);
    });

    return marker;

    }
    function onLoad() {
    if (GBrowserIsCompatible()) {
    var map = new GMap(document.getElementById("map"));
    map.addControl(new GSmallMapControl());

    map.centerAndZoom(new GPoint(-75.15223503112793, 38.622302334540215), 4);

    var point = new GPoint(-00.00, 00.00);
    var marker = createMarker(point,'marker text')
    map.addOverlay(marker);

    }
    }

    //]]>
    </script>

  3. #3
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    1,610

    Default Re: Google Map manipulation

    Thank you SOOOOOO much. It took me another 30 minutes to get this to work (screwed up my google api key code) but this will certainly do the trick!

    Thank you, thank you, thank you!!! If you want a few free one way links just let me know!
    Coastal Delaware Real Estate Sales
    REHOBOTH BEACH CONDOS | REHOBOTH BEACH REAL ESTATE | REHOBOTH BEACH MOBILE HOMES
    * Results not typical. Individual results may vary.

  4. #4
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    1,610

    Default Re: Google Map manipulation

    Weeeee!!!

    http://www.coastalmobile.com/open-test.html

    Just playing with my new toy!
    Coastal Delaware Real Estate Sales
    REHOBOTH BEACH CONDOS | REHOBOTH BEACH REAL ESTATE | REHOBOTH BEACH MOBILE HOMES
    * Results not typical. Individual results may vary.

  5. #5
    Join Date
    Jan 2005
    Posts
    126

    Default Re: Google Map manipulation

    No problem, thanks for the coordinates tool; I've been doing it the hard way.

    By the way, here's the code to add a thumbnail to the marker bubble:

    var point = new GPoint(-00.00, 00.00);
    var marker = createMarker(point,'<img src="http://www.domain.com/thumbnail.jpg"><br>marker text')
    map.addOverlay(marker);
    Last edited by skipfactor; 03-15-2006 at 01:45 PM.

  6. #6
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    1,610

    Default Re: Google Map manipulation

    Indeed it works!!! http://www.coastalmobile.com/cm-test2.html

    And to add colored text and multiple lines of text to the marker bubble?

    I tried html and all I got was a map that did not work.

    How about the code to make my actual markers my company logo gif instead of the red marker?

    Then I need to learn how to stick a whole home tour (8 homes on one map)

    Argh, I think I should just stick with one home- one map, or sign up for some computer code classes at the local community college. I know just enough that after hours of manipulating other peoples code I can sometimes get things to work.
    Coastal Delaware Real Estate Sales
    REHOBOTH BEACH CONDOS | REHOBOTH BEACH REAL ESTATE | REHOBOTH BEACH MOBILE HOMES
    * Results not typical. Individual results may vary.

  7. #7
    Aaron is offline Real Estate Webmasters Staff Aaron's Most Recent Blog Entry: Email etiquette Aaron is on a distinguished road
    Join Date
    Jun 2005
    Location
    Nanaimo
    Posts
    23,433

    Default Re: Google Map manipulation

    Nice Google Map :-) I suppose you've seen this guys site?
    http://www.econym.demon.co.uk/googlemaps/

    It is the best resource for google map examples I have found..

    It helped me make this
    http://www.thesarasotamls.com/gmap.php

    :-D

  8. #8
    Join Date
    Aug 2005
    Location
    Delaware
    Posts
    1,610

    Default Re: Google Map manipulation

    Thank you again. You guys are absolutely incredible. I think I have found a new home. There is more than enough information at this site to keep me busy for the next few years!
    Coastal Delaware Real Estate Sales
    REHOBOTH BEACH CONDOS | REHOBOTH BEACH REAL ESTATE | REHOBOTH BEACH MOBILE HOMES
    * Results not typical. Individual results may vary.

+ Reply to Thread

Posting Permissions

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