Based on http://www.bdcc.co.uk/Gmaps/ll_grat_v3_demo.htm