Incorrect geo chart bounds value
Incorrect geo chart bounds value from dataFunction when it approach the edge of the map region
by YeongCY
HTML
<script src="https://cdn.zoomcharts-cloud.com/1/latest/zoomcharts.js"></script>
<content>
<button onclick="refresh()">Refresh</button>
<div id="demo"></div>
</content>
CSS
content {
height: 100%;
width: 100%;
padding: 0;
margin: 0;
}
JavaScript
chart= new GeoChart({
"layers": [
{
"name": "Points",
"type": "items",
"style": {
"nodeStyleFunction": function (node) {
node.label = node.data.id;
},
"node": {
"fillColor": "#2fc32f",
"lineColor": "#b0dc0b",
"lineWidth": 2,
"display": "droplet"
},
"nodeLabel": {
"backgroundStyle": {
"fillColor": "#eab404"
},
"textStyle": {
"fillColor": "#de672c"
}
}
}
}
],
"navigation": {
"initialLat": 35.044089999999997,
"initialLng": -90.246212999999997,
"initialZoom": 4,
"minZoom": 4
},
"advanced": {
"pointer": {
"noClickOnDoubleClick": false
}
},
"container": "demo",
"data": [
/* {
"url": "https:\/\/zoomcharts.com\/data\/just-points-on-map.json",
"perBoundsData": false
} */
{
dataFunction: function(request, success, fail) {
console.log(request.east,
request.west,
request.north,
request.south);
success({
nodes: []
})
},
"perBoundsData": true,
"perZoomData": true,
}
],
"interaction": {
"resizing": {
"enabled": false
}
}
});
function refresh() {
chart.reloadData();
}