Slashdot Mirror


Google Releases API for Google Maps

Elyscape writes "The Google Blog announced today the release of an API for Google Maps. While the use of the API requires a key that limits the owner to 50K pageviews a day, which is similar to but far more generous than Google's Web Search API, Google notes that they are willing to work something out with website owners who expect to breach that large barrier. This release definitely opens the door for (or, at least, eases the creation of) more advanced Google-Maps-based applications. On the negative side, it broke several current Google-Maps-based sites, such as ChicagoCrime.org. So get started! Go to the Google Maps API home, sign up for a key, and go wild! (Note: going wild may entail fixing broken sites. It does not necessarily entail actually visiting the wild.)

30 comments

  1. how long until... by everyplace · · Score: 1

    flickr geoblogging google maps (api-based) hack. and... go!

    1. Re:how long until... by geoffspear · · Score: 1

      Geobloggers doesn't seem to have been broken, so I'd image it will take them longer to bother with making it API based than it will take the ones that did break.

      --
      Don't blame me; I'm never given mod points.
  2. 50K Pageviews by Mr.Sharpy · · Score: 3, Interesting

    I suppose the question is, do they consider each tile you load from their map server a page view? If they do, it wouldn't take many users scrolling around on the maps to get their.

    1. Re:50K Pageviews by Dorktrix · · Score: 5, Informative

      A "page view" is the number of times users download the JavaScript, not the number of map tiles, so it is a fairly high limit for most sites. Also, we are not restricting use of the API to small sites -- we are just asking that sites who have more page views than 50K contact us first to ask permission so we can make sure we can handle the load.

      Bret Taylor
      Product Manager, Google Maps

    2. Re:50K Pageviews by OmniVector · · Score: 1
      write now i'm writing an application that uses google's map data, and the only way i can effectively get that data is to append:
      &output=js
      to the end of a google maps query, then regex parse out the xml inbetween the
      document.write('<xml>..</xml>')
      tags. i can't seem to find any conclusive information on the api page about weather or not uses like mine possible from any infrastructure (not just javascript) without the hassle.
      --
      - tristan
    3. Re:50K Pageviews by M.C.+Hampster · · Score: 1

      Any plans on releasing a more commerical version of this? I'd love to use this on a web application I'm writing, but we'll probably need something like an SLA, etc. I'm thinking something along the lines of Microsoft's MapPoint Web Service.

      --
      Forget the whales - save the babies.
    4. Re:50K Pageviews by bfizzle · · Score: 1

      That and loading the maps sends a couple cookies ur way. Who knows what info google is gathering none the less... but it won't keep me from using it.

  3. Technical Question from a non-programmer by RabidMonkey · · Score: 1, Interesting

    I'm reading about the API (which I know nothing about, because I don't know anything more than an API is an interface to a program) and thought while reading about including their code in yours, 'how do you know that their code is safe?'

    They obviously don't release the code for the api .. how you know that when you call a function? from the api, it's not doing something malicious? how do you know they aren't using it to track users, send malicious code, etc? granted - it's Google, but still?

    Is there built-in protection? Is it safe to blindly use someone elses api? If you call GBrowserIsCompatible() and it calls GDeleteEverythingOnHarddrive, is there something to stop that?

    Just curious. I'd like to learn how to do play with these things, but it seems like a pretty steep learning curve.

    Thanks!

    --
    We emerge from our mother's womb an unformatted diskette; our culture formats us. - Douglas Coupland
    1. Re:Technical Question from a non-programmer by geoffspear · · Score: 1, Insightful

      If your browser lets javascript code erase your hard drive, you've got bigger problems than worrying about whether Google is going to do something malicious.

      --
      Don't blame me; I'm never given mod points.
    2. Re:Technical Question from a non-programmer by 0kComputer · · Score: 1

      Is there built-in protection? Is it safe to blindly use someone elses api? If you call GBrowserIsCompatible() and it calls GDeleteEverythingOnHarddrive, is there something to stop that?
      Generally most API's are safe, if its not we'll find out. If you are really paranoid get a packet sniffer like ethreal and look whats coming through, I'd reccomend just leaving that part to the security researchers :P

      --
      Top 10 Reasons To Procrastinate
      10.
    3. Re:Technical Question from a non-programmer by Mr.Sharpy · · Score: 3, Insightful

      They obviously don't release the code for the api .. how you know that when you call a function? from the api, it's not doing something malicious? how do you know they aren't using it to track users, send malicious code, etc? granted - it's Google, but still?

      The API is written in javascript, the code for which is open by nature. The code is obfuscated/compressed, but it's easy to expand it out to readable syntax. This code is not going to do something on the clientside without everyone knowing it. That's not to say they're not doing tracking on the server side...but that's another matter entirely.

    4. Re:Technical Question from a non-programmer by Anonymous Coward · · Score: 5, Insightful

      You've got a very good point that none of the other repliers seem to have noticed.

      External Javascript somebody else supplies is *BAD*. Not "can delete your hard drive" bad, but "can rob your cookies and molest your website" bad.

      Example: You are an admin for a large company using a popular content management system. You think this is a useful addition to your website, so you add in the code. A wayward Google employee rigs some of the Google servers to transmit malicious Javascript 1% of the time. You visit the new page to check everything is working, the malicious Javascript transmits your cookies containing your admin details to an external server, and now the wayward Google employee has complete write access to your website.

      There is built-in protection from malicious Javascript. Unfortunately, it doesn't apply in these circumstances. The secure way of doing this is to copy the (known-safe through whatever means) Javascript to your own server instead of referencing Google's version. Unfortunately, this is against their terms of service.

      This is a really big security hole that people don't seem to pay attention to. I've noticed people trusting password bookmarklets written in this style and all sorts. Basically, if you include other people's Javascript in your website with <script src="http://example.com/...">, then you are implicitly trusting example.com with all of your user's cookies, etc.

  4. no geocoding ... yet by enrico_suave · · Score: 2, Interesting

    I'm a little dissapointed the geocoding functions didn't make the first release of the API (and hope they are added/included soon).

    e.

    --
    Build Your Own PVR/HTPC news, reviews, &
    1. Re:no geocoding ... yet by FriedTurkey · · Score: 1

      As someone who has written integrations with MapInfo, a free alternative would be very popular for geocoding. Even a paid subscription service would sell. The management and updating of local servers costs a lot of money.

    2. Re:no geocoding ... yet by GregBryant · · Score: 1

      Their idea of geocoding doesn't integrate well with their map interface yet. Geocoding, for Google, is a part of search, and if you search, you have to geocode against Page Rank and the bounding box of the map you're looking at ... and this doesn't work right at all. It currently always gives strange results.

  5. Well done, Documentation by Free_Trial_Thinking · · Score: 2, Interesting

    That is well done, that's how documentation should be, just tell me how to do all the common things I might want to do:

    move the map
    goto a location
    blah blah

    Try finding useful information like that in under 10 minutes on almost any existing "API".

  6. address lookup? by paRcat · · Score: 1

    The only thing that I don't see is the ability to do a search for a particular address. I'm thinking this would be awesome to include on my company's intranet for outside sales people, but we don't have gps coords for our customers. :\

    1. Re:address lookup? by QuantumRiff · · Score: 1

      I think a handy thing for my web site would be to mark on the google map our location, and let someone type in their own address.. hit the submit button, and give them directions to our location.. is this possible?

      --

      What are we going to do tonight Brain?
    2. Re:address lookup? by Mz6 · · Score: 4, Informative

      There are ways to do and have Google do the work for you. Try this: http://maps.google.com/maps?q=White%20House%20Wash ington%20DC&output=js This will generate a blank page, but viewing the source will reveal the XML code, including the Lat/long locations that Google found for the search term. Replace "White House Washington DC" with your street addresses and you should get the points you're looking for. From there it's trivial to parse through the XML and grab the lat/long locations.

      --
      Hmmm.
    3. Re:address lookup? by Scaba · · Score: 1

      Grab the zipcodes database from the CivicSpace Labs project and look up lat/lon against user-supplied zipcodes.

  7. What about raw tile access? by inio · · Score: 2, Informative

    TerraServer USA has allowed direct access to tiles for a while now. While this release is nice, it doesn't explicitly allow programatic tile access from other environments (e.g. Flash) which could allow for new types of navigation, interaction, and cross-platform consistency.

    (full disclosure note: I wrote this about a year ago, so I've got a an interest in direct tile access.)

    1. Re:What about raw tile access? by dschuetz · · Score: 1

      That's very nice! You done anything further with it? Is the source available?

      (I've done some terraserver /google maps hacking, myself, so I've got a similar interest in direct tile access. :) )

    2. Re:What about raw tile access? by seweso · · Score: 1

      I know why you want google's tiles, because the one's you have now are ugly.

  8. Google Games? by aywwts4 · · Score: 1
    --
    Web Developers: Celebrate to our roots! Animated Gifs and Tiled Backgrounds, dont let our history die!
  9. Superb reality-check for the web by GregBryant · · Score: 2, Insightful

    They put the satellite views in! That lets everyone inject a bit of reality into their web pages. This API is so simple ... soon little maps & satellite images, with GIS overlays, will be dripping from every website.

  10. Non-Earth Maps by kmahan · · Score: 1

    So will there be maps/sat images released for the Moon and Mars? Seems like there is enough imagery available from the various probes to put together at least localized areas for topo and sat images.

    Not a lot of roads up there unless you apply the definition of "someone drove over it once". Then there are several roads left by various probes.

    --
    Invalid Checksum. Retrying.
    1. Re:Non-Earth Maps by cashman73 · · Score: 1
      So will there be maps/sat images released for the Moon and Mars?



      Personally, I'm waiting for the google maps images for Uranus. :-)

  11. Google Maps Wiki by yellowbkpk · · Score: 1

    Forgive the karma whoring, but I host a Google Maps wiki at the following URL:

    http://gmaps.yellowbkpk.com/

    So far people have posted their sample Google Map mashups there along with some code samples. Most of this was done BEFORE the Google Maps API was released, so some of the sites may not work due to the new javascript file version.

    Also, make sure to check out the Google-Maps-API and Google-Maps Google Groups. The Google-Maps-API group is particularly active and there ahve been over 100 posts just today.

  12. My Google Maps API Hack by Diclophis · · Score: 1

    http://sig.sourceforge.net/google/

    Usings AJAX and PHP to get the points into the map.