//# sourceURL=Customizations.js/** * Modify BI map behavior, so that the circles are smaller/bigger * 2017-07-28 Piotr Szrajber <piotr.szrajber@hexagongeospatial.com> */letCIRCLE_SIZE=5;/** * Modify painter's behavior */functionchangeMapBehavior(attempts){// find the choropleth$GP.bi.stage.findWidgets({descriptors:[{chartM:{chart:"choropleth"}}]},function(widgets){if(!widgets||!widgets[0]){setTimeout(function(){if(attempts>0){changeMapBehavior(attempts-1);}},300);return;}// main logicletpainter=widgets[0].chart.painter(),origPaintStyle=painter.paintStyle();painter.paintStyle((feature)=>{letstyle=origPaintStyle.call(this,feature);style.radius=CIRCLE_SIZE;returnstyle;});painter.paint();});}// launch the customizationchangeMapBehavior(100);
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.