|
|
@ -339,15 +339,8 @@ angular.module('kibana.map2', []) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var path = d3.geo.path() |
|
|
|
dr.path = d3.geo.path() |
|
|
|
.projection(dr.projection); |
|
|
|
.projection(dr.projection).pointRadius(0.2); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Special fix for when the user changes from mercator -> orthographic
|
|
|
|
|
|
|
|
//The globe won't redraw automatically, we need to force it
|
|
|
|
|
|
|
|
if (scope.panel.display.data.type === 'orthographic') { |
|
|
|
|
|
|
|
dr.svg.selectAll("path").attr("d", path); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(scope.data); |
|
|
|
console.log(scope.data); |
|
|
|
|
|
|
|
|
|
|
@ -364,8 +357,6 @@ angular.module('kibana.map2', []) |
|
|
|
return dr.projection(coords); |
|
|
|
return dr.projection(coords); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dr.svg.select(".overlay").remove(); |
|
|
|
dr.svg.select(".overlay").remove(); |
|
|
|
|
|
|
|
|
|
|
|
dr.svg.append("rect") |
|
|
|
dr.svg.append("rect") |
|
|
@ -387,7 +378,7 @@ angular.module('kibana.map2', []) |
|
|
|
return 'land'; |
|
|
|
return 'land'; |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
.attr("d", path); |
|
|
|
.attr("d", dr.path); |
|
|
|
|
|
|
|
|
|
|
|
countryPath.exit().remove(); |
|
|
|
countryPath.exit().remove(); |
|
|
|
|
|
|
|
|
|
|
@ -399,9 +390,20 @@ angular.module('kibana.map2', []) |
|
|
|
.on("drag", function() { |
|
|
|
.on("drag", function() { |
|
|
|
if (scope.keylistener.keyActive(17)) { |
|
|
|
if (scope.keylistener.keyActive(17)) { |
|
|
|
dr.projection.rotate([d3.event.x / 2, -d3.event.y / 2, dr.projection.rotate()[2]]); |
|
|
|
dr.projection.rotate([d3.event.x / 2, -d3.event.y / 2, dr.projection.rotate()[2]]); |
|
|
|
dr.svg.selectAll("path").attr("d", path); |
|
|
|
|
|
|
|
|
|
|
|
//dr.svg.selectAll("path").attr("d", dr.path);
|
|
|
|
|
|
|
|
dr.g.selectAll("path").attr("d", dr.path); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
})); |
|
|
|
})); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Special fix for when the user changes from mercator -> orthographic
|
|
|
|
|
|
|
|
//The globe won't redraw automatically, we need to force it
|
|
|
|
|
|
|
|
if (scope.panel.display.data.type === 'orthographic') { |
|
|
|
|
|
|
|
//dr.svg.selectAll("path").attr("d", dr.path);
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -413,8 +415,8 @@ angular.module('kibana.map2', []) |
|
|
|
//@todo fix this
|
|
|
|
//@todo fix this
|
|
|
|
var dimensions = [width, height]; |
|
|
|
var dimensions = [width, height]; |
|
|
|
displayBinning(scope, dr, dimensions); |
|
|
|
displayBinning(scope, dr, dimensions); |
|
|
|
displayGeopoints(scope, dr, path); |
|
|
|
displayGeopoints(scope, dr); |
|
|
|
displayBullseye(scope, dr, path); |
|
|
|
displayBullseye(scope, dr); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|