Nov
10
2009

Location-aware mobile web apps using Google Maps v3 + geolocation

When hiring Engineers, I always look for evidence of pet projects, so recently I thought it was fair to create one of my own: GeoMeme, the fun way to measure and share real-time local twitter trends.

Visitors to GeoMeme choose a location on the map, and two search terms to compare. GeoMeme then measures and compares the number of matching tweets within the bounds of the map, based on public data from a number of mobile twitter apps.

As an example, GeoMeme can work out that ‘love’ beats ‘hate’ in Manhattan:

GeoMeme is a desktop web application and also a location-aware mobile web app for iPhone and Android phones.

Implementing the mobile version of GeoMeme as a web app has some advantages and disadvantages, compared to building native iPhone &/or Android applications.

Native apps are great because they currently offer the deepest integration to the full capability of the phone, for example using device APIs to access Contacts, the Camera Roll, an Accelerometer, or the GPS chip. For some applications, this deep device integration is essential and so a native application is beneficial.

On the other hand, emerging HTML5-based mobile browsers are aiming to standardise integration to such device APIs, starting with Geolocation APIs; meaning that location-aware mobile web apps are now becoming viable. Aligned with this development is the new version of the Google Maps API. v3 has been greatly simplified since v2, and is now optimized for use on mobile phones. Less is more.

The deciding factor for me choosing to build a mobile web app for GeoMeme rather than a native app was development speed. A mobile web app enjoys far greater code re-use from the desktop web version, and it is possible to push regular updates and improvements to users, without having to wait for appstore approval or for users to upgrade.

I believe this need for development speed is common among a good proportion of mobile apps that are still in ‘rapid iteration’ or ‘release early, release often’ mode, so this post is intended to share some of the techniques used in GeoMeme with developers wanting to build their own location-aware mobile web apps.

Let’s build an example location-aware mobile web app called ‘Here I Am!’, for the photographically challenged. The app will present some local photographs (from Panoramio) which can be shared with friends on Twitter or Facebook.

Where on earth is that mobile phone..?

The first job of a location-aware mobile app is to work out where on earth the mobile phone currently is. Unfortunately, at the time of writing, there is still no universally reliable and accurate solution for a mobile web app to detect the location of the mobile phone it is running on. However the following partial solutions can be combined to good effect:

(more…)

Nov
10
2009

Fast map re-location using Google Static Maps v2 + geocoder

GeoMeme is a pet project of mine. It’s a web app, and also a mobile web app for iPhone and Android, that measures real-time local twitter trends.

Visitors to GeoMeme choose a location on the map, and two search terms to compare. GeoMeme then measures and compares the number of matching tweets within the bounds of the map, based on public data from a number of mobile twitter apps.

As an example, GeoMeme can work out that ‘District 9′ beats ‘Inglorious Basterds’ in Manhattan.

As well as offering users the normal pan and zoom controls to move the map around, GeoMeme also introduces an innovative geo-autocomplete control which is powered by the geocoder service from Google Maps v3 API and the new Static Maps v2 API.

This blog post shares some details of how the geo-autocomplete control works, and offers some code so you can build your own geo-autocomplete controls.

1. Based on a partial location typed by the user, obtain a list of possible matching locations:

If the user has already typed ‘San’ into a form field, we can obtain a list of possible matching locations by passing this partial location to the geocoder service from Google Maps v3 API, as follows:

(more…)

Mar
15
2008

The Human Race and Space/Time poverty

When I found out that the human race was speeding up, by around 10% over the past decade, I deliberately walked around slower that day.

A study carried out in the early 1990s demonstrated that pedestrians’ speed of walking provides a reliable measure of the pace of life in a city, and that people in fast-moving cities are less likely to help others and have higher rates of coronary heart disease.

Using identical methods to those employed in the previous work, the present day research teams discovered that the pace of life is now 10% faster than in the early 1990s. The biggest changes were found in the Far East, with the pace of life in Guangzhou (China) increasing by over 20%, and Singapore showing a 30% increase, resulting in it becoming the fastest moving city in the study. More here from Richard Wiseman.

I find that rate of evolutionary acceleration a bit unnerving. And here I am, sleepless in Sydney at 4am, waiting for baby to arrive and now wondering if there’s any geo dimension to all of this. So here goes:

  1. A Google spreadsheet of the data
  2. geo-coding from Geonames, imported into the spreadsheet using importXML
  3. a flickr photo of someone walking in each city, imported into the spreadsheet using importFeed via a Yahoo Pipe. The photos don’t look too releveant, maybe I need to clean my pipe.
  4. some Google Maps code generated from Pamela Fox’s Spreadsheet Map Wizard

Space/Time poverty: how fast do people walk, where?

Click on the markers or list to see how fast.


Written by bob in: everything | Tags: , , , ,

Powered by WordPress. Theme: TheBuckmaker.