google-url-shortener

I need a (preferably javascript) example of Google Url shortener Api


I'm working on a 'Place your Marker and get its URL' function for a Google Maps Page. The URLs produced are similar to :

http://www.fuerteventura-maps.com/marker11.html?=28.4234731,%20-14.014550299999996=14=Sample%20Marker=roadmap

I'd like to somehow have the URL automatically shortened using the Google URL Shortener so that the URL the user needs to copy is just: http://goo.gl/ZEQ7u

I've looked at the documentation but it assumes greater knowledge than I possess. Unlike the Maps Api documentation there are no simple examples for me to adapt.

Can anyone point me to a simple Google URL Shortener demo please?


Solution

  • 'Twas a little bit of a struggle for me but this page gave me something to download and work with.

    I've now got exactly what I was after:

    Url shortener demo

    (At first I was getting errors so I emailed the author - Tom McFarlin . and within an hour he had replied and corrected the fault in his code. Thanks Tom.)