Leaflet / Leaflet.VectorGrid

Display gridded vector data (sliced GeoJSON or protobuf vector tiles) in Leaflet 1.0.0
593 stars 192 forks source link

remove Polygon boundary in style #226

Closed am2222 closed 4 years ago

am2222 commented 4 years ago

Hi, I am trying to remove the polygon boundary but it seems it is not working. Am I doing something wrong in my style? here is my style object

return style = {
                fill: true,
                stroke: false,
                fillColor: options.colorFunction(properties.VALUE),
                color: options.colorFunction(properties.VALUE),
                weight: 0,
                fillOpacity: 1,
                opacity: 0
            }
IvanSanchez commented 4 years ago

Hi, great to hear that you find Leaflet useful!

However, this issue tracker is used for reporting bugs and discussing new features. For questions on using Leaflet, please use gis.stackexchange.com or stackoverflow.

If you are really sure that this is a bug in leaflet, or a feature request, please change the wording to make it look like a bug report.

am2222 commented 4 years ago

@IvanSanchez thanks. I thought it is something related to this library. So the style which is used here is leaflet's regular style. right?

IvanSanchez commented 4 years ago

Yes, but wrapped around, so VectorGrid can handle several layers in the same vector tile source. I guess you've read through https://leaflet.github.io/Leaflet.VectorGrid/vectorgrid-api-docs.html , right?

am2222 commented 4 years ago

Yes, I ended up with this style

    fill: true,
    stroke: true,
    fillColor: options.colorFunction(properties.VALUE),
    color: options.colorFunction(properties.VALUE),
    weight: 1,
    fillOpacity: 1,
    opacity: 1

If I set stroke: false it does not draw borders of features but there is still an empty space between two adjustance cells which seems is for border. I ended up setting border's color same as fill. It works but it is a bit slower I think.