/** * Modify choropleth's stroke color to black * 2017-07-25 Piotr Szrajber <piotr.szrajber@hexagongeospatial.com> */// helper functionwaitForMap(callback,errback,attempts){gsp.bi.stage.findWidgets({descriptors:[{chartM:{chart:"choropleth"}}]},function(widgets){if(!widgets||!widgets[0]){setTimeout(function(){if(attempts>0){waitForMap(callback,errback,attempts-1);}else{if(typeoferrback==="function")errback("Still no choropleth");}},300);return;}if(typeofcallback==="function")callback(widgets[0]);});}// modify the paintstylefunctionmodifyMapColors(map){letorigPaintStyle=map.chart.painter().paintStyle(),paintStyle=function(arg0){varret=origPaintStyle(arg0);ret.color="#000";// TODO: modify the paint stylereturnret;};map.chart.painter().paintStyle(paintStyle);map.chart.painter().paint();}// executewaitForMap(modifyMapColors,function(err){console.error(err);},100);
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.