|
@@ -1541,8 +1541,9 @@ ${ dashboard.layout_skeleton() }
|
|
|
<select data-bind="options: $root.collection.template.sortedFieldsNames, value: $root.collection.template.leafletmap.labelField, optionsCaption: '${ _('Choose...') }'"></select>
|
|
<select data-bind="options: $root.collection.template.sortedFieldsNames, value: $root.collection.template.leafletmap.labelField, optionsCaption: '${ _('Choose...') }'"></select>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div data-bind="leafletMapChart: {visible: $root.hasRetrievedResults() && $root.collection.template.leafletmapOn(), isLoading: isLoading(), datum: {counts: $root.response()},
|
|
|
|
|
|
|
+ <div data-bind="leafletMapChart: {showMoveCheckbox: true, moveCheckboxLabel: '${ _('Search as I move the map') }', visible: $root.hasRetrievedResults() && $root.collection.template.leafletmapOn(), isLoading: isLoading(), datum: {counts: $root.response()},
|
|
|
transformer: leafletMapChartDataTransformer,
|
|
transformer: leafletMapChartDataTransformer,
|
|
|
|
|
+ onRegionChange: function(bounds){ alert(ko.toJSON(bounds, null, 2)); alert(getSolrURL(bounds)) },
|
|
|
onComplete: function(){ var widget = viewModel.getWidgetById(id()); if (widget != null) { widget.isLoading(false)}; } }">
|
|
onComplete: function(){ var widget = viewModel.getWidgetById(id()); if (widget != null) { widget.isLoading(false)}; } }">
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -2634,6 +2635,10 @@ $(document).ready(function () {
|
|
|
$(document).trigger("warn", "${ _('Result highlighting is unavailable: the collection does not have an index field') }");
|
|
$(document).trigger("warn", "${ _('Result highlighting is unavailable: the collection does not have an index field') }");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ function getSolrURL(bounds){
|
|
|
|
|
+ return 'http://localhost:8983/solr/logs4_shard1_replica1/select?q=*%3A*&rows=1&wt=json&indent=true&facet=true&facet.heatmap=location_srpt&facet.heatmap.geom=["'+ bounds._southWest.lng + ' ' + bounds._southWest.lat +'" TO "'+ bounds._northEast.lng + ' ' + bounds._northEast.lat +'"]';
|
|
|
|
|
+ }
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
${ commonfooter(messages) | n,unicode }
|
|
${ commonfooter(messages) | n,unicode }
|