Tuesday 29 May 2018

javascript - Leaflet geojson styling leaves gaps between polygon


I'm styling a geojson polygon composed of multiple closely placed vertical segements which doesnot have a gap in between (i've checked the topology). I want to display just the fill and without stroke. But when doing so, using following code:


function getColor(d) {
if (d<=40){return 'green';}
if (d<=60 && d>40){return 'purple';}
if (d>60){return 'orange';}
}


function style(feature) {
return {
weight: 0,
opacity: 0,
//color: 'white',
//dashArray: '3',
fillOpacity: 1,
fillColor: getColor(feature.properties.id)
};
}


The result is as follows: Leaflet map showing gaps between polygons


You can see the white lines in between polygons.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...