Skip to content

Commit

Permalink
Display an hover tooltip on coverage map
Browse files Browse the repository at this point in the history
  • Loading branch information
noirbizarre committed May 4, 2015
1 parent bef1155 commit 2e7e18f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion udata/static/js/dataset/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,17 @@ define([

L.tileLayer(TILES_URL, TILES_CONFIG).addTo(map);

layer = L.geoJson();
layer = L.geoJson(null, {
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.name);
layer.on("mouseover", function () {
layer.openPopup();
});
layer.on("mouseout", function () {
layer.closePopup();
});
}
});

if ($el.data('geojson')) {
loadJson(map, layer, $el.data('geojson'));
Expand Down

0 comments on commit 2e7e18f

Please sign in to comment.