default date in minimap

parent c895220f
......@@ -20,6 +20,10 @@ var map = new ol.Map({
})
});
if (labels && labels.length > 0) {
addImageLayer(labels[0])
}
//addLayer
function addImageLayer(labelDate) {
$.ajax({
......@@ -29,8 +33,7 @@ function addImageLayer(labelDate) {
url: '/reports/tiles/tileinfo',
success: function (data) {
map.removeLayer(imagelayer)
console.log("response ", data);
console.log({purchase_id, zone, labelDate});
var xyz = new ol.layer.Tile({
opacity: 1,
source: new ol.source.XYZ({
......
......@@ -120,11 +120,11 @@
<section class="content">
<div class="row col-lg-11 title">
<div class="text-center">
<h1>{{ report_name }}</h1>
</div>
<div class="col-md-12 info" style="margin-bottom: 15px;">
<div class="box box-success">
<div class="box-body with-border">
......@@ -291,17 +291,19 @@
let endDate = "{{ endDate }}";
let clouds= "{{ clouds }}";
let oldLabel = "{{defaultDataSet}}";
var config = {{graphData}}
config.options = {
responsive: true,
maintainAspectRatio: false,
// scales: { xAxes: [{ stacked: true }], yAxes: [{ stacked: true }] },
legend: {
display:true,
onClick: newLegendClickHandler,
}
};
console.log(config);
let labels = {{labels}};
var config = {{graphData}};
config.options = {
responsive: true,
maintainAspectRatio: false,
// scales: { xAxes: [{ stacked: true }], yAxes: [{ stacked: true }] },
legend: {
display:true,
onClick: newLegendClickHandler,
}
};
console.log(config);
{% endautoescape %}
</script>
<script type="text/javascript" src="{% static 'reports/js/reportImg.js' %}"></script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment