Avatar britg

all the web, gaming, and foodie stuff that’s fit to printf()

Good vs Evil at TechCrunch50

TechCrunch 50 is over and congrats to the winner - Yammer.

There were two presenters that stuck out to me, one positively and negatively, and they just happened to be gaming related (or they stuck out because they were gaming related).

Atmosphir

From TechCrunch:

Atmosphir is a gaming platform and engine that allows users to easily create their own levels in a 3D world by painting basic elements into a three dimensional grid.

As far as gameplay goes, Atmosphir seems to be very straightfoward, much like a standard “Mario Brothers” game. The player’s avatar can run and jump around each level, which allows for jumping puzzles and the stomping on bad guys, but that’s about it.

Interesting and I love it.  The recent success and all around awesomeness of Braid proves that there is still a lot more fun to be had with simple platforming games.  By exposing an abrstraction layer on top of the building blocks of a platformer, I think Atmosphir will spawn a strong nostalgic movement back towards short, fun, pick-me-up-for-15-minutes games.

Increasingly, I find that I’m too busy to play the AAA titles while I sat down and ran through Braid in the span of a couple hours - I look forward to seeing what comes out of it.  Heck, I may try to see if I can get in the limited beta and mess around with the tools!

Shattered Reality

From TechCrunch:

Shattered Reality has released Kaos War, a multi-player game with absolute transparency and social network design functionality which allows the players - not a bunch of overpaid and overfed game designers - create future expansion packs and levels based on player requests.

Although it’s in the same vein as Atmosphir - I just don’t like the vibe I’m getting from this snippet.  Don’t know if that’s John Bigg’s fault or if he’s paroting the pitch the Shattered Reality guys gave.

Why do we want to remove the professionals from the profession?  I know it sounds hypocritical because I just lauded Atmosphir for doing basically the same thing, but these are two separate buckets in my mind.  

There are typically no “overpaid and overfed game designers” (horrible line - what the hell?) in the realm of short pop-cap games like the ones Atmosphir create - it’s mainly passionate independent <5 person studios.  So they are bring accessibility to the genre in my opinion.  Shattered Reality doesn’t seem to care about bring accessibility to anything.  They seem hell bent on bringing cookie cutter, cheap, and ‘user generated’ content to the AAA game market.  Do we really need that when the 1,789,327th installment of the Madden franchise just came out?

I won’t go any further, because I run the risk of getting into the politics of cheap labor - and I vow to never get into politics.

Anyways, I always enjoy the TechCrunch Conference.  Much more so than anything that comes out of Demo.  Looking forward to next year!

Ok, Apple Not Stupid - They Have Just Turned Into “The Man”

Wow, I got a lot of feedback yesterday.  Protip: don’t call Apple stupid in the title of your blog post if you want Apple fans to read the content of your post!  I got some really thoughtful comments which I’ll go over here, but I got a lot more email that, if there were Cliff’s Notes, would read something like, “no your [sic] stupid.”

bud says:

I’m sure apples boilerplate rejection has nothing to do with the apps rejection.

It is pretty obvious why they would reject it; to prevent hooks from websites into the iphone; potentially malicious hooks.

Isn’t this obvious? If it is not obvious, you are disingenuous.

Yes, I agree - most likely Apple is not ignorant of the implications of Big5 and phonegap projects!  There is a small chance that the review team at Apple just didn’t “get it”, but most likely they did get it and decided to keep it under wraps.

Why? Peter agrees with bud that there are security concerns:

As has been pointed out, this is rejected because it allows an external application to access information about the iPhone. That said, he’s right that someone at Apple should have explained that rather than using the “limited utility” explanation.

To wander a little bit afield, though, I worry about this “limited utility to the broad iPhone/iPod touch user community” sentence.

One of the reasons for third-party developers is to address these areas that are of limited utility to some but valuable to others. For example, medical dictionaries are not of interest to “the broad iPhone/iPod touch community”, though there are some who will find these invaluable. So is Apple now going to try to determine whether there really is a market for your application and decide whether or not enough people would be interested in it?

He brings up a good point about the implications of Apple deciding what is considered ‘useful’ to the general public.  2 years ago if you had asked me if Twitter was useful to the general public, I would have laughed in your face.  Now, I read the RSS feeds of a bunch of different people on it and I consider it one of the best ways to access people’s raw, unfiltered thoughts.

Imagine if Apple owned the internet platform and just didn’t see the usefulness of this app…

But, as I said - Apple isn’t stupid (in the ignorant way), they are just turning into “The Man.”  My partner in crime got so riled up he went so far as to suggest Apple is the new Microsoft.  Personally, I would rather have the new innovative Big5 browser and then patch the security risks later, rather than shutter it out of fear.

As much as I hate to use Internet Explorer as an example of anything but a steaming pile of sumo wrestler dump on a burning tire, imagine if the 90+% of the people in the 90’s hadn’t been exposed to it because it might have security risks?  We know now that it was chock full of nice juicy security risks, but I would say the exposure to the internet and booming of the industry that pays my bills is a far greater consequence!

Who Google Chrome Affects the Most: Adobe

I see a lot of coverage of the new browser out by Google - Chrome.  And rightly there should be - this is pretty exciting stuff!  Javascript running on it’s own thread per tab?  Sweet!

I’ve also seen a lot of “Should Mozilla be pissed?” or “How will this affect Microsoft?” etc.  But I haven’t seen a lot of coverage on who I think is affected most by this move: Adobe.  Why?  Because the whole concept behid Chrome is to spead up web applications, namely Google’s style of web applications which all happen to be using AJAX instead of Flash.

So, if Google has completely revamped it’s javascript engine in Chrome so that each tab operates javascript in it’s own thread, and you can run AJAX applications like google docs, gmail, etc. continuously without worrying about your browser bringing down your entire computer, we’re likely to see a renewed interest in AJAX as a platform.  Also, we’ll see a renewed effort from other browser vendors to make their javascript engines comparible.  This is all bad news for Adobe Flex/Flash.

How are you, as a web developer, going to build that next business app?  Using Adobe’s Flex/Flash platform that requires users have a plugin installed (although most do) but has all the limitations of Adobe’s Flash plugin running in the browser?  Why would you when for most business applications, AJAX can meet all your needs AND be optimized to run as well as desktop applications?

No matter what the outcome, it’ll definitely be fun to see how this plays out!

Oh, and I’m writing this blog post through Chrome - it’s so new and shiny, go get it now!

Update: Chrome doesn’t have to gain huge market share for this scenario to play out!

Chrome is open source and hence their Javascript Engine is open source! (http://chromium.org) So, Chrome doesn’t have to make a huge dent in market share to make a huge dent in how the other browsers support javascript and AJAX apps.

From limited testing over about 2-3 hours I could noticeably tell a difference in performance running Gmail, Google Docs, Google analytics, and google reader in separate tabs as opposed to doing this on firefox.

This tells me that their javascript engine technology is superior to others out there - and since it is open source, I can imagine a scenario where other browsers, especially mozilla, adopt this engine.

So, google chrome may never ever gain market share but I’m willing to bet their javascript technology will! This is what bodes poorly for Adobe in my opinion - a new browser market that isn’t dominated by Chrome per se, but is dominated by fast and multi-threaded javascript engines!

Brave New Fiction on Ars Technica

Ars Technica just published an interesting overview of ‘byte-sized’ stories that explores the possibilities of using microblogging as a story telling medium. Ryan Paul, the author, mentioned brave new fiction (thanks Erica!):

A much grander test of the microstory concept is taking place at Brave New Fiction, a proof-of-concept web application that allows writers to compose entire stories with one 140-character line every day. Erica Naone, an assistant editor at MIT Technology Review with whom I discussed microblogging several months ago, is one of the many participants who is writing a nifty story at Brave New Fiction.

We just participated in the Seattle Google App Engine Hack-a-thon and it’s renewed our interest in working on the platform (where brave new fiction is currently hosted). Since there are still some glaring holes in the app engine framework, and since the Google rep at the hack-a-thon hinted very strongly that more languages would be supported ’soon,’ I am still reluctant to devote much time and effort into developing brave new fiction in it’s current form. Also, our client work has reached an all-time high so time to devote to bnf is at a premium.

But it is very exciting and hard to resist pouring everything into brave new fiction when people are using it and talking about it! If you’re interested in helping us with development of the site, give me a hollar at brit @ figaro interactive dot com and we can talk!

Why Aptana is Quickly Becoming the Killer Stack

Anyone who knows me knows that I am a huge fan of Aptana.  (The recent acquisition of the pyDev plugin and its eventual incorporation into the IDE only solidifies that position.)  Their suite of services are quickly turning into the killer app stack for a large majority of web developers including myself and if you’re a developer who hasn’t given Aptana a try, I highly recommend you do - it’s free.

Yes, everything they’re doing has been done before.  And yes bigger and badder players have offerings in the IDE, cloud hosting, and developer community sectors, but it’s all about consolidation baby, and Aptana wins hands down in that arena.

The IDE Is Key

The foundation of any good development stack is not the test or deployment servers.  It’s not the language,  documentation, or even the community.  It’s the IDE, damnit.  Because, really - what connects all the other layers?  It should be the IDE, and that’s exactly what the Aptana IDE does.

The Aptana devs have done an excellent job in providing much more than just a text editor with syntax highlighting.  With the soon to be released Aptana IDE 1.2, you get project management, remote asset management with FTP, SVN and their new aptanacloud interface, database management, code tutorials and assistance for popular libraries and frameworks.

No, Aptana will probably never be as good a PHP editor as Zend Studio.  And it’ll probably never be a replacement for Cyberduck or Filezilla for file management, or Amazon’s web services for cloud computing.  And you’ll probably still try to ping the jQuery docs only to realize they are still slow as hell (good alternative here, btw).  But, in the Get Stuff Done web development world, having a working solution for all these built in to your IDE is invaluable.

The Future is in The Cloud

As a relatively new entrant into the web technology world, I would venture to say that the biggest and most exciting development during my short tenure is Cloud Computing.  But, I’ve said it before, and I’ll say it again - managing Amazon Web Services and EC2 instances is hard work.  Google App Engine fixes the hard work problem, but you’re forced into Google’s narrow framework and constraints.

Aptana’s new Cloud service is right smack-dab in the middle.  You’re given a sliding scale of server size, a couple of customization options, and bam! you’ve got a web server.  There’s no 50 step, command line based, get-one-step-wrong-and-you’re-hosed process to build and deploy a machine instance.  But, you also don’t have the fine-grained control of exactly what software your server runs.

That’s an easy trade-off for the web application developer, because execution on the core functionality of your app is what matters.  No one really cares how you’ve squeezed every last ounce of optimization into your server cluster (though there’s nothing wrong with that pursuit).

Oh, by the way, did I mention that Aptana Cloud is integrated with the Aptana IDE on every level - database management, source control, resource management, deployment, etc. etc?  Yeah, it is and it kicks ass.  Go sign up for the early access program and see for yourself.

Javascript is the New Cranberry

You know how you can walk down the juice aisle at your local grocery store and see 50 different juices and cranberry just seems to be involved with every damn one of them?  That’s javascript in the web world.  More often than not, JSON is the platform of choice for APIs and web services.  AJAX pervades just about every Web 2.0 application.  Hell, it’s even made it into our databases with CouchDB.

Hey, there’s nothing wrong with that - Jeff Attwood may hate working with javascript - but I kinda sorta almost maybe like it!  Especially when working with frameworks like jQuery, javascript can be a fun experience when it adds interactivity and wow-factor to your web application.

Enter Aptana’s end-to-end Javascript solution - Jaxer.  Damn, they thought of everything!  If web developers are spending so much time in their code interfacing with javascript APIs and writing Javascript UI interactivity, why not put javascript on the server side and use it as your middleware?  I like it.

Hell, I can see in the near future a scenario where Javascript is the only scripting language in an entire application.  Front end javascript, with Jaxer on the server, and CouchDB as the data-store.

Oh, and did I mention that Jaxer is integrated into the Aptana IDE with a debug console, profiler, etc? Ok, you get the point.

So Why Did I Write This?

Sounds like I’m a pretty hardcore Aptana fanboy, doesn’t it?  Well I can assure you the Aptana team hasn’t paid me should be paying me to say all this, damnit.  Oh well, I’ll throw in a diss just for good measure.  For some ungodly reason, the Aptana IDE only just recently added a word wrap feature.  Yes, you read that right - word wrap.  Word.  Wrap.

Ok, they maybe might have had some sort of plausible excuse, but damn - Word. Wrap.  That’s sort of like a television not having volume control, or a keyboard without the tilde - you don’t miss it until you don’t have it.

Integrating CakePHP with bbPress - Part 2

This is the second of a 3 part tutorial on how to integrate bbPress with CakePHP 1.2.x. When complete, these 3 tutorials will accomplish:

  1. Integrating bbPress in a sub-folder (not a subdomain) of your cake install (part 1 here)
  2. Integrating user registration - when a user registers through your cake application they are automatically registered in bbPress.
  3. Integrating the login - when a user is logged in via the cake application they are automatically logged in in bbPress.

Part 2 - Integrating User Registration

This part is a little more tricky, but not unmanageable.   The challenge here is that your Cake application probably uses the Auth component, or a custom user setup.  So you probably have a prebuilt users table and chances are it does not conform to what bbPress is looking for in it’s users table.  Also, the encryption scheme between the two is probably different.

With that in mind, I’ve made the following design decisions

  1. My Cake users schema will remain intact AND the bbPress users schema will remain intact.
  2. Users must register through my Cake application only
  3. CakePHP is using the built-in Auth component.
  4. When a user registers through my Cake application - I run the necessary logic from the Cake User model to update the bbPress users table.
  5. The bbPress tables are in the same database as my CakePHP tables
  6. I change the encryption scheme of bbPress to conform to my Cake app.

Step 1: changing the bbPress password encryption.

If you’ve followed Part 1 of this tutorial, you’ve successfully installed and ran bbPress in a subfolder of your cakephp install.  Navigate to that subfolder, then open following file: bb-includes/backpress/code.wp-pass.php

Notice two functions, hash_password(...) and check_password(...).  We will overwrite these two functions to match the hashing that takes place in our CakePHP install.  If, as I denoted above, you are using the built-in CakePHP Auth component, this is very simple - just comment out the existing functions and replace them with the following:

  1.   function hash_password($string) {
  2.     $string = ‘YOUR CONFIGURE::SALT VALUE’.$string;
  3.     return sha1($string);
  4.   }
  5.  
  6.   function check_password($password, $hash, $user_id = ) {
  7.     $string = ‘YOUR CONFIGURE::SALT VALUE’.$password;
  8.     if(sha1($string) != $hash) {
  9.       return false;
  10.     } else {
  11.       return true;
  12.     }
  13.   }

Replace the YOUR CONFIGURE::SALT VALUE with the appropriate value from your CakePHP application. This can be found in app/config/core.php.

With these two functions in place, your bbPress user system should be hashing and checking the passwords the same way.

Step 2: Saving a bbPress user from the CakePHP install.

Fortunately, CakePHP provides an easy hook into the ORM saving process with the afterSave() model callback.

To get your User model to save a new bbPress user when a new Cake user is created, add the following functions to your User model script:

  1.   function afterSave($created)
  2.   {
  3.     if($created)
  4.     {
  5.       $sql = "INSERT INTO `bb_users`
  6.       (`user_login`, `user_pass`, `user_nicename`,
  7.       `user_email`, `user_url`, `user_registered`,
  8.       `user_status`, `display_name`)
  9.       VALUES(
  10.       ‘".$this->data[‘User’][‘username’]."’,
  11.       ‘".$this->data[‘User’][‘password’]."’,
  12.       ‘".$this->data[‘User’][‘username’]."’,
  13.       ‘".$this->data[‘User’][‘email’]."’,
  14.       ”,
  15.       NOW(),
  16.       0, ‘".$user[‘User’][‘username’]."’)";
  17.       $this->query($sql);
  18.     }
  19.   }

Notice that we are just creating an SQL statement with all the necessary fields required to successfully insert the user into the bbPress system, and then executing that SQL. Also, if you are using the default functionality of the Auth component, $this->data['User']['password']; should automatically be hashed with the same scheme as Step 1.

Step 3 - Preventing registration from bbPress

This is the easy part. Simply add the following line to the top of your register.php script in you bbPress install and replace the path with the correct path to your cake registration page.

  1. die(header(‘Location: /path/to/your/cake/registration/page’));

So, that’s it! Now, when you register a user through your Cake application, they should also appear in the bbPress users table, and you should be able to successfully log into both with the exact same credentials.

But, the plot thickens - we don’t want our users to have to log in to both the cake app and bbpress. We want them to be logged into both automatigically. Stay tuned for part 3 of this tutorial and I’ll attempt to tackle this very conundrum.

Integrating CakePHP with bbPress - Part 1

I’ve been working on StatForge.com for the past few days and one of the community features I want to integrate is a forum.  Rather than go for something bloated like phpbb or vanilla, I decided to go with bbPress from the makers of Wordpress.

This is the first of a 3 part tutorial on how to integrate bbPress with CakePHP 1.2.x.  When complete, these 3 tutorials will accomplish:

  1. Integrating bbPress in a sub-folder (not a subdomain) of your cake install
  2. Integrating user registration - when a user registers through your cake application they are automatically registered in bbPress. (UPDATE: part 2 here)
  3. Integrating the login - when a user is logged in via the cake application they are automatically logged in in bbPress.

Part 1 - Integrating bbPress in a sub-folder (not a subdomain)

It may be personal preference, but I’m not a big fan of subdomaining parts of an application.  There are definitely legitamite technical reasons to do so, but when I can get away with it, I try to use subfolders, i.e. http://statforge.com and http://statforge.com/forum/.

There’s a small hurdle here since CakePHP wants to ReWrite all your paths (if you’ve installed it in your domain root), but it’s easy to overcome.  Find the .htaccess file in the root of your cake install.  It should look like this:

  1.   RewriteEngine on
  2.    RewriteRule    ^$ app/webroot/    [L]
  3.    RewriteRule    (.*) app/webroot/$1 [L]

This is rewriting all of your requests to the webroot folder. Assuming you want to install bbPress into a subfolder called forum (i.e. http://statforge.com/forum/) the change this .htaccess file to the following:

  1.   RewriteEngine on
  2.  
  3.    RewriteCond %{REQUEST_URI} ^/forum/(.*)$
  4.    RewriteRule ^.*$ - [L]
  5.  
  6.    RewriteRule    ^$ app/webroot/    [L]
  7.    RewriteRule    (.*) app/webroot/$1 [L]

This simply reads - if the Request starts with /forum/ pass it through normally. If not, let Cake handle it. The only limitation here is that you cannot have a controller named ‘forum’ in your cake application.

That’s it - you should be able to drop a fresh bbPress install into the /forum subfolder and access it normally without Cake interfering.

I’ve already integrated the user registration between my CakePHP install and my bbPress install, but I’ve gotta run for the time being. Hopefully tomorrow I’ll throw up part 2 - it’s a bit more complicated. (UPDATE: part 2 here)

Fixing the Keyboard Issue on the Current Version of PhoneGap

PhoneGap currently has an issue with the keyboard not appearing whenever a form input is selected on a web site.  The key here is that the keyboard IS actually showing up, but it is being drawn behind the UIWebView used to render the webpage.

Here’s the solution I came up with.  I don’t understand enough about the rendering heirarchy to explain the why, but here’s the how:

In the GlassAppDelegate.m source file you should see a block of code that looks like the following:

  1. // Set up the image picker controller and add it to the view
  2.   imagePickerController = [[UIImagePickerController alloc] init];
  3.  
  4.   // Im not sure why the next line was giving me a warning… any ideas?
  5.   // when this is commented out, the cancel button no longer works.
  6.   imagePickerController.delegate = self;
  7.   imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
  8.   [window addSubview:imagePickerController.view];

Simply move this block of code BELOW the following line. This renders the imagePicker object after the web view.

  1. webView.delegate = self;

Problem - the imagePicker is obscuring the web view! Simply add the statment imagePickerController.view.hidden = YES; to the above block of code so that the entire block looks like:

  1. // Set up the image picker controller and add it to the view
  2.   imagePickerController = [[UIImagePickerController alloc] init];
  3.  
  4.   // Im not sure why the next line was giving me a warning… any ideas?
  5.   // when this is commented out, the cancel button no longer works.
  6.   imagePickerController.delegate = self;
  7.   imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
  8.         imagePickerController.view.hidden = YES;
  9.   [window addSubview:imagePickerController.view];

As it sounds like, we are just hiding the imagePickerController’s view - we don’t need it when the application starts anyways. But, we do need it when we access the images API through javascript, so find the block:

  1. else if([(NSString *)[parts objectAtIndex:1] isEqualToString:@"getphoto"]){
  2.         NSLog(@"Photo request!");
  3.         NSLog([parts objectAtIndex:2]);
  4.  
  5.         webView.hidden = YES;
  6.         [window bringSubviewToFront:imagePickerController.view];
  7.         NSLog(@"photo dialog open now!");
  8. }

and add the line imagePickerController.view.hidden = NO; above webView.hidden = YES; so that the entire block looks like:

  1. else if([(NSString *)[parts objectAtIndex:1] isEqualToString:@"getphoto"]){
  2.         NSLog(@"Photo request!");
  3.         NSLog([parts objectAtIndex:2]);
  4.         imagePickerController.view.hidden = NO;
  5.         webView.hidden = YES;
  6.         [window bringSubviewToFront:imagePickerController.view];
  7.         NSLog(@"photo dialog open now!");
  8. }

Voila! Compile and run the app and the keyboard should now appear when a form input is pressed on your iphone.

Extending PhoneGap to Return the iPhone’s Unique Identifier

Yesterday I wrote about the nascent project, PhoneGap, that acts as a Cocoa Touch-native wrapper to your web-based application.  I’ve been playing with it non-stop since I stumbled accross it and it works like a charm!

When phonegap initializes, it loads a few parameters from the client iPhone into your javascript environment.  By default these include the phone model, version, and gap version.  For my specific application, I wanted to load the iPhone’s unique identifier.

To add this uniqueIdentifier parameter is simple - looking in the phonegap sources, Find the GlassAppDelegate.m script in the Classes folder. Using Xcode’s method-finder bar, navigate to the (void)webViewDidStartLoad:(UIWebView *) method and replace it with the following:

  1. - (void)webViewDidStartLoad:(UIWebView *)webViewLocal {
  2.   NSLog(@"Page loaded");
  3.   NSString *jsCallBack = nil;
  4.   jsCallBack = [[NSString alloc] initWithFormat:@"\
  5.           __gap = true; \
  6.           __gap_version=’0.1′; \
  7.           __gap_device_model=’%s’; \
  8.           __gap_device_version=’%s’; \
  9.           __gap_device_uniqueid=’%s’;",
  10.           [[[UIDevice currentDevice] model] UTF8String],
  11.           [[[UIDevice currentDevice] systemVersion] UTF8String],
  12.           [[[UIDevice currentDevice] uniqueIdentifier] UTF8String]
  13.           ];
  14.   //NSLog(jsCallBack);
  15.   [webViewLocal stringByEvaluatingJavaScriptFromString:jsCallBack];
  16.   [jsCallBack release];
  17.  
  18. }

I’m simply access the uniqueIdentifier property of Cocoa’s UIDevice class.

To be able to access this paramter in your javascript, jump into the gap.js that you should be loading in your iphone web app, find the Device.init function, and replace with:

  1.    init: function(model, version) {
  2.         try {
  3.             Device.available = __gap;
  4.             Device.model = __gap_device_model;
  5.             Device.version = __gap_device_version;
  6.             Device.gapVersion = __gap_version;
  7.       Device.uniqueIdentifier = __gap_device_uniqueid;
  8.         } catch(e) {
  9.             alert("GAP is not supported!")
  10.         }
  11.     },

Voila! You can now access the client iphone’s unique identifier via Device.uniqueIdentifier in your javascript.

Next up - figuring out how to access the keyboard through the UIWebView :X

PhoneGap - Native iPhone Apps Running your HTML, CSS, JavaScript Code

Stumbled across phonegap - a project that allows you to publish a native iPhone app that simply acts as a pass-through to your web application of choice.  The best part is, you can tap into some of the core frameworks of the iphone SDK via javascript, i.e. you can tap into the Core Location framework, Acceleration, etc, etc! Hats off to the developers of this project. It’ll make my life a whole lot easier.

Step 1: Develop a website on the stack of your choice. Better yet, use the iUI library to develop a website that looks and feels like a native iphone app.

Step 2: Download phonegap from github and open the project in Xcode.  Simply edit the file called url.txt in the Resources folder to point to the URL of your iphone app. Compile and run and you should see your website appear.

Step 3: To access the SDK libs, simply use their function calls:

  1.     getLocation();
  2.  
  3.      // automatically calls this callback
  4.      gotLocation(lat,lon) {
  5.           // do awesome stuff with google maps, etc, etc.
  6.      }

Check out more information on their google group.

Passion Projects