Region Map Polygon Line Widths and Legend background Customization

While having fun with RegionMaps with mapserver self hosted geojson requests, I have found a need to alter/remove the line width for the edges of the polygons. Is there any info on how to remove the polygon borders, or change line width/colors? I am not finding docs on how to do this in RegionMaps, so any suggestions would be appreciated.

Also, is there a way to set the background color in the legends (from transparent) so that they are more visible?

To better show the problem I am having, Here is the next zoom level out where the lines overtake the polygons in the visualization. I would love it if someone knows how to remove the lines, color them with polygon fill color, or if nothing else, change line width to something incredibly small or 0.


hi @drfuka,

can you open an enhancement request for modifying the line-styling:

This isn't possible right now, but you're right, this would be a nice addition. We're looking to introduce some changes to the region-map in 6.1, so could be a good opportunity to add those there as well.

As for changing the background of the legend, that isn't possible either. So I would open an ER for that as well.

Looks cool btw. Can I ask what you are working on? Is that something like a synthetic street-grid or the map of a video game?

In the meantime, if you're not afraid to get your hands dirty, you can always manually modify the Kibana source code.

In your Kibana-foldor, change the weight parameter in the src/core_plugins/region_map/public/choropleth_layer.js file.

Restart kibana.


The weight param is the line-thickness. Change it to 0 or 1.

For the background of the legend, in src/core_plugins/tile_map/public/styles/_tilemap.less, change the background-CSS property to something like background: rgb(255,255,255).

When you restart Kibana, the source files will recompile and you should see the changes. Obviously, this is a little hacky, but might get you the result you want.


1 Like

Mahalo Thomas et al.
Worked like a charm:

Notes for other newbs like myself.
You will want to set "console.enabled: false" in your kibana.yml to force the recompile on restart (toggle back to true after or you will be waiting a long time during each restart)... and in my case, I installed as root, so "programatically created and updated" code by user "kibana" on compile did not have access to overwrite files in kibana/optimize/bundles/ . Change permissions or delete as needed to allow dynamic regeneration on the first compile after installation.


I put in this feature request to make line-styling configurable.

We're exploring supporting topojson as a format, so flexibility in line-styling will then be even more important, given that we'll have a lot more (and smaller) shapes on a map.

Thanks... let me know if you would like some help playing with different solutions or in testing.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.