Tag Archives: geolocation

Fun with CSS3 animations

I have been playing around with CSS3 animations for my day job and so I thought I would apply one to PubCrawler. The location marker now pulses:

marker

The CSS for this is incredibly simple:


.pulse_map_marker{
-webkit-animation: scale_map_marker 2s ease-out;
-webkit-animation-iteration-count: infinite;
}

@-webkit-keyframes scale_map_marker {
0%{-webkit-transform: scale(0.5);}
50%{-webkit-transform: scale(1);}
100%{-webkit-transform: scale(0.5);}
}

It basically scales the image down by half, then back to full size and back to half again over a 2 second period. The “ease-out” part smooths out all of the transitions. I originally tried a slightly different method:


.pulse_map_marker{
-webkit-animation: scale_map_marker 1s ease-out -1s alternate forwards;
-webkit-animation-iteration-count: infinite;
}

@-webkit-keyframes scale_map_marker {
from{-webkit-transform: scale(0.5);}
to{-webkit-transform: scale(1);}
}

Unfortunately, Android does not seem to like the use of the “from” and “to” clauses. Other Webkit browsers such as iOS and Chrome are fine with it. This is just one example of several inconsistencies in CSS3 compatibility between Webkit implementations.

PubCrawler updated to Google Maps API V3

Good old PubCrawler. I have somewhat neglected my duties in maintaining this web app. However, I recently completed the migration to Google Maps API V3 for it. Advantages of this include:

  • Automatic display of controls based on device. For example zoom buttons are displayed on Android devices but not on the iPhone (because it has multitouch built in). This means that I have done away with the buttons below the map.
  • Built in map type buttons (Map, Hybrid, Satellite, Terrain) so I got rid of the button to do this at the top
  • Speed: it uses less data and therefore loads maps faster. They built it with mobile devices in mind.

There’s more but Google themselves can explain it better than I can. PubCrawler running on Maps API V2 (or PubCrawler Classic as it might become known) is still available here. I actually started this process of migration to V3 not long after it was announced. However, at first the full feature set wasn’t there so I parked it for a while. I’m not sure when the API became complete enough for PubCrawler’s needs but everything is there now.

Revisiting PubCrawler after such a long break means that the iPhone-esque look and feel is starting to look a little dated to me. At some point its going to need revising to something more unique and suited to the application’s purpose.

Is Google Ditching Gears?

Google Gears has been conspicuous by its absence in two places recently. The Droid no longer has Google Gears geolocation built into its browser. Instead it uses HTML5. In the recent Chrome OS announcement it was also HTML5 all the way. I think perhaps Google was using Gears as a stop gap until HTML5 came on stream. Now its supported by the Firefox 3.5, iPhone 3.x, Palm Pre and Android 2.0 there’s not much reason to keep Gears going. This is probably a Good Thing as now developers can being to concentrate on using one geolocation implementation.
Update 1st Dec: Looks like I’m not the only one who has noticed this: Gizmodo: Is Google Gears Dead?

PubCrawler and Firefox 3.5

I’m using Firefox 3.5 at home and its great. It adds HTML5 support so it should work with PubCrawler. However, whilst the geolocation functionality works well the local storage does not, so crawls cannot be saved. This is due to the local storage support being of a different type to the WebKit browsers like Safari in iPhone OS 3.x. The Google Gears Add-on is not supported by Firefox 3.5 yet so that’s not an option either. PubCrawler is primarily a mobile web app so this is not high on my list to fix.

PubCrawler HTML5 geolocation

I’ve been neglecting the PubCrawler a bit recently because of my current widget fetish. I made one quick change to it last night though. It now has HTML5 geolocation for browsers that support it. I tested it in Firefox 3.5 beta 4 which is a bit flakey when it comes to the geolocation stuff even on other peoples’ sites. Ideally I need someone to test it with a new Palm Pre which it should work for. Please contact me on webmaster at ubikapps.net if you do. Either that or I will have to wait until iPhone OS 3.0 comes out and try it on my iPod Touch.

I have lots of changes I want to make to PubCrawler. One thing that is high on my list is updating it for Google Maps API V3 which has a much improved mobile experience. I may have to create a separate version though because V3 is not fully featured yet.

Update: just installed OS 3.0 on my iPod touch and it works.

PubCrawler HTML 5 DB – Save crawls on iPhones

I have updated PubCrawler to use HTML 5 client side storage. This is supported by iPhones and iPod Touches with firmware 2.0 and above. It means that these devices can now save crawls. For Android phones a Google Gears database is still used.
It took me a while to get the HTML 5 DB working properly. The fact that it works asynchronously (rather than synchronously like Gears) made it difficult to implement all the functionality. Also the created tables don’t have a built in ROWID column (like Gears) so I had to create my own. I’ll probably revisit it later to tidy up the code.

PubCrawler now has manual location

PubCrawler now has manual location functionality. When Google Gears is not installed it falls back to asking for location in a JavaScript prompt(). With or without Gears on the map screen the location can be changed with a new button. Another minor change is the removal of the map buttons at the bottom for everything but Android devices. iPhones can use multitouch gestures to zoom and drag the map (Google’s functionality not mine!). For Android 1.5 I have added drag functionality myself though.

Coming soon: HTML5 database to save crawls on iPhone (instead of Google Gears DB which Android uses).

PubCrawler Web App

My first mobile web app is PubCrawler. It finds pubs in your location automatically and can show you a route around them. Navigate from pub to pub and save the number of pints drunk in each. Crawls are saved for viewing later.
Its being developed in HTML, CSS 3.0 and JavaScript using Google Gears GeoLocation, Maps API, Local Search and dojo Toolkit. Google Gears is required. It works on:

  • Android phones like the T-mobile G1
  • Windows Mobile 6 with Opera Mobile 9.5 technology preview build (go to gears.google.com in the browser to install Gears)
  • Firefox 3 with Google Gears installed (although the CSS 3.0 elements won’t look right)
  • Google Chrome

On first visit a prompt will pop-up asking you if you trust the site to use Gears. If you don’t click the accept button it won’t work.