There are plenty of ways to skin this cat. At MapBox we use UTFGrid, a system of making maps interactive that is super-fast, flexible, and compatible with older browsers - even Internet Explorer.
This means that we don't send vector data to the browser: we send rasterized interaction data that describes where features are.
But we can still do some fancy interaction. Glower does feature highlighting by rendering lines of pixels with Canvas. It can do the outlines of any feature type - polygons, lines, and points, and on any existing map from MapBox hosted on MapBox Hosting.
You use Glower like you'd use the Wax Interaction control:
// Modest Maps var myglower = glower.mm( map, // a modest maps map object tilejson // a tilejson object ); // Google Maps API v3 var myglower = glower.g( map, // a google map object tilejson // a tilejson object );
You'll need two files: glower.js and
glower.mm.js or glower.g.js:
Google is g, and Modest Maps is mm.