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

Rendering Problem of points #110

Closed
bloigge opened this issue Jul 31, 2017 · 6 comments
Closed

Rendering Problem of points #110

bloigge opened this issue Jul 31, 2017 · 6 comments

Comments

@bloigge
Copy link

bloigge commented Jul 31, 2017

Hi,

We are using pbfs from a geoserver group-layer, which contains points, lines and polygons. Lines and polygons work as expected but for some reason points don't get rendered properly in border areas when using circle markers or icons.

chrome_2017-07-31_12-11-28

chrome_2017-07-31_12-24-03

I am not sure if this is an issue with geoserver concerning the overlapping margins for each tile or a Leaflet.VectorGrid bug.

@bloigge
Copy link
Author

bloigge commented Jul 31, 2017

Same issue has been noted here #63 as well

@perliedman
Copy link
Member

I suspect this is an issue similar to #108, that is you don't have enough overlap between your tiles, which causes points to only be rendered on one side of the tile boundary.

For rendering to be correct when the symbol would overlap a tile boundary, the point must be present in both of the tiles, and therefore also rendered twice. This becomes especially apparent when working with large symbols.

@bloigge
Copy link
Author

bloigge commented Aug 1, 2017

Ok thanks for clarification. I already increased the metatile size and the extra pixel border in the geoserver grouplayer settings but unfortunately it doesn't work. As a workaround I changed the the icon size to be very small. I am not sure how mapbox-gl works under the hood, but using the same source didn't create this behavior there:
chrome_2017-08-01_11-45-09

@bloigge bloigge closed this as completed Aug 6, 2017
@perliedman
Copy link
Member

Hm, that is weird. Regarding how Mapbox GL works, you can get the general idea by reading the vector tile spec's section on clipping, if you haven't already: https://www.mapbox.com/vector-tiles/specification/#clipping

@TroySchmidt
Copy link

TroySchmidt commented Jan 9, 2018

For someone else finding this and looking for better direction, add buffer parameter to your options object you pass to L.vectorGrid.slicer. I set mine to 500 and now it is working as I would expect.

 const slicerStyle = {
      buffer: 500,
      pane: 'dynamics',
      maxZoom: 20,
      vectorTileLayerStyles: {
        sliced: () => {
          return {
            icon: new L.Icon()
          };
        }
      }
    };
    
    this.graphicsLayer =  L.vectorGrid.slicer(targetFeatures, slicerStyle).addTo(this.map);

@mngyng
Copy link

mngyng commented Dec 13, 2018

See #149. Sounds like the same issue. The buffer option didn't work for me, so I changed the query to add a buffer for points on the tile edge.

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

4 participants