Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fillOpacity and fillColor have no effect when rendering circlemarkers #279

Open
slutske22 opened this issue Jan 5, 2023 · 1 comment
Open

Comments

@slutske22
Copy link

When rendering point geometries, regardless of passing in fillOpacity and fillColor to the vectorTileLayerStyles function, it seems to render the points as circlemarkers with no fill at all:

Screen Shot 2023-01-04 at 3 32 31 PM

The code to get this follows the docs pretty closely:

  L.vectorGrid
    .slicer(geoJsonGoeshere, {
      rendererFactory: L.canvas.tile,
      vectorTileLayerStyles: {
        sliced: function (properties, zoom) {
          return {
            radius: 5,
            color: properties.daqi.color,
            fillOpacity: 1,
            fillColor: properties.daqi.color
          };
        }
      }
    })
    .addTo(map);

Sandbox demonstrating the issue

Is this a known bug? Am I doing something wrong? This seems to be the case for both canvas and svg renderers.

@abreufilho
Copy link

abreufilho commented Jan 29, 2023

I know it has some time, but try:

L.vectorGrid
    .slicer(geoJsonGoeshere, {
      rendererFactory: L.canvas.tile,
      vectorTileLayerStyles: {
        sliced: function (properties, zoom) {
          return {
            fill:true,
            radius: 5,
            color: properties.daqi.color,
            fillOpacity: 1,
            fillColor: properties.daqi.color
          };
        }
      }
    })
    .addTo(map);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants