Skip to content

Commit

Permalink
Merge remote-tracking branch 'joe/fix/tooltips' into feature/tilemap
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Thomassie committed Nov 6, 2014
2 parents 6e36e91 + 72aa377 commit 54da546
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/kibana/components/vislib/visualizations/tile_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,18 @@ define(function (require) {
* return {undefined}
*/
TileMap.prototype.bindPopup = function (feature, layer) {
var props = feature.properties;
var popup = L.popup({
autoPan: false
})
.setContent(
'Geohash: ' + props.geohash + '<br>' +
'Center: ' + props.center[1].toFixed(1) + ', ' + props.center[0].toFixed(1) + '<br>' +
'Count: ' + props.count
);

// TODO: tooltip-like formatter passed in?
layer.bindPopup(
'Geohash: ' + feature.properties.geohash + '<br>' +
'Center: ' + feature.properties.center[1].toFixed(1) + ', ' + feature.properties.center[0].toFixed(1) + '<br>' +
'Count: ' + feature.properties.count
)
layer.bindPopup(popup)
.on('mouseover', function (e) {
layer.openPopup();
})
Expand Down

0 comments on commit 54da546

Please sign in to comment.