google

Hooray for OpenSocial!

Tom's picture
Tags: 

I haven't got a lot to add to this TechCrunch post other than to say that I find it immensely cheer-inducing. There are a lot of unknowns surrounding the OpenSocial platform, but its looming marketshare at least makes it seem likely that I'll be able to avoid learning any more bowdlerized web technologies with "FB" at the front of their names.

FBML, FQL, FBJS — it was getting out of control, and it all stinks of proprietary lock-in and a rather lame (but admittedly necessary from a security standpoint) attempt to wrap the LAMP stack under a layer of branding. That's not to say that every technology coming out of Facebook is worthless — I've heard some encouraging things about Thrift from people I respect (although if you're not in the market for an especially high-performance RPC framework, using something established like XML-RPC still seems like a better idea to me).

But Google's got a fairly good track record of only reinventing the wheel when they need to build a particularly enormous wheel. So cheers to this potential game-altering alliance. I want APIs, not languages; interfaces, not environments.

Creating Google Mapplets

Tom's picture
Tags: 

Earlier this week Google Maps added Mapplets functionality. The feature lets third-party developers offer their GMaps mashups as toggleable layers that can be added to the GMaps interface.

In addition to my duties here at EchoDitto, I also do some work for DCist as a hobby — in fact, I'm pretty sure that my work on this Google Map of the DC subway system helped land me my job. That app has languished, though, functional but limited and still stuck in version 1 of the GMaps API.

So I took a stab at porting it over to the Mapplet format. It went pretty well — you can see the results by clicking here. There were a number of API changes to contend with, though.

First, there was the transition to the GMap2 object, which most of you have probably already done. The Mapplet interface makes initialization much easier — you can count on the map object to already be instantiated — but other parts were confusing. Most notably, Google appears to have finally un-switched the order of the latitude and longitude parameters in their function calls. That's a welcome change, but figuring out how to undo (or double down on) the kludgy solution I was using made things pretty complicated. The subway map was displaying in Antarctica for a little while.

The actual Mapplet is implemented as an XML file based on the Google Gadget spec. You can find an example here, in the Mapplet documentation. It's a pretty straightforward format to work with, although documentation on some of the Google Gadget metadata tags can be a little unclear.