Results 1 to 5 of 5

Thread: Google Maps API

  1. #1
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055

    Google Maps API

    Anyone know anything about this?

    I have a KML file from Google Earth. I would like to merely load up the API on a website and have it zoom to the KML file, that is it. It should be easy right, but I think doing simple things like that are lost in the documentation overload the provide for the thousands of other features they have.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  2. #2
    Senior Member agua's Avatar
    Join Date
    Sep 2005
    Location
    Pottsville, NSW
    Posts
    531
    I did one not long ago... and remember having to strip down the info required - all I did was settle for a latitude and longitude - so my final code looked like this:
    Code:
    <script type="text/javascript">
    //<![CDATA[
    function load() {
    if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map"));
    map.setCenter(new GLatLng(-28.167140,153.538000, 0.010510,0.000000), 16);
    map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());
    map.openInfoWindow(map.getCenter(),
          }
        }
    
    //]]>
    </script>
    The only setting I really need is this one
    Code:
    map.setCenter(new GLatLng(-28.167140,153.538000, 0.010510,0.000000), 16);
    which sets the zoom and area I want in the center of the map - the rest is all the various controllers you can add.

    So I think if you just look for one setting in your KML and go from there, you should be OK
    I Do Website Design - but I am here to learn all about publishing

  3. #3
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    Ahh... but the KML includes a bunch of other stuff like pictures & placemarks I want pulled too.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  4. #4
    Senior Member agua's Avatar
    Join Date
    Sep 2005
    Location
    Pottsville, NSW
    Posts
    531
    Well - I think you will just need to go through the documentation in order to add new things... I did add a textnode by adding this:
    Code:
    document.createTextNode("Marine Parade, Coolangatta"));
    - so I presume there will be something available.

    I have never added a KML file - although I did find this on adding KML files when skimming through the documentation - although I'm not sure if its what you want.

    Maplets look interesting also - although these weren't available when I used Google Maps
    I Do Website Design - but I am here to learn all about publishing

  5. #5
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    interesting, thanks Agua.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

Similar Threads

  1. Review: Google Adsense
    By Chris in forum Advertising Networks
    Replies: 16
    Last Post: 12-02-2017, 02:32 AM
  2. An Interesting Option to Google & MSN Maps
    By ! search-engines- in forum General Chat
    Replies: 0
    Last Post: 02-02-2006, 10:02 PM
  3. More Google Maps madness
    By Cutter in forum General Chat
    Replies: 4
    Last Post: 09-02-2005, 12:44 PM
  4. Blog with links to cool spots on Google Maps
    By Cutter in forum General Chat
    Replies: 10
    Last Post: 07-20-2005, 04:27 PM
  5. Google Maps
    By moonshield in forum General Chat
    Replies: 4
    Last Post: 07-01-2005, 09:04 AM

Bookmarks

Posting Permissions

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