secret
Created

  • Download Gist
hover.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13
 
sql.execute("select cartodb_id, area, ST_Simplify(the_geom, 0.1) as the_geom from european_countries_e").done(function(geojson) {
countriesLayer.addData(geojson);
countriesLayer.on('mouseover', function(e) {
e.layer.setStyle({
weight: 3,
opacity: 1
});
})
countriesLayer.on('mouseout', function(e) {
countriesLayer.resetStyle(e.layer);
});
});

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.