{"action":"created","issue":{"url":"https://api.github.com/repos/Leaflet/Leaflet.VectorGrid/issues/188","repository_url":"https://api.github.com/repos/Leaflet/Leaflet.VectorGrid","labels_url":"https://api.github.com/repos/Leaflet/Leaflet.VectorGrid/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/Leaflet/Leaflet.VectorGrid/issues/188/comments","events_url":"https://api.github.com/repos/Leaflet/Leaflet.VectorGrid/issues/188/events","html_url":"https://github.com/Leaflet/Leaflet.VectorGrid/issues/188","id":385368646,"node_id":"MDU6SXNzdWUzODUzNjg2NDY=","number":188,"title":"sliced mapicons","user":{"login":"tobwen","id":1864057,"node_id":"MDQ6VXNlcjE4NjQwNTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1864057?v=4","gravatar_id":"","url":"https://api.github.com/users/tobwen","html_url":"https://github.com/tobwen","followers_url":"https://api.github.com/users/tobwen/followers","following_url":"https://api.github.com/users/tobwen/following{/other_user}","gists_url":"https://api.github.com/users/tobwen/gists{/gist_id}","starred_url":"https://api.github.com/users/tobwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobwen/subscriptions","organizations_url":"https://api.github.com/users/tobwen/orgs","repos_url":"https://api.github.com/users/tobwen/repos","events_url":"https://api.github.com/users/tobwen/events{/privacy}","received_events_url":"https://api.github.com/users/tobwen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-28T17:05:29Z","updated_at":"2018-11-28T18:35:50Z","closed_at":null,"author_association":"NONE","body":"I've got a lot of points in PBF format. Anyone with an idea, why Leaflet's default icons get sliced? \r\n\r\n![canvas](https://user-images.githubusercontent.com/1864057/49168379-a44c1300-f337-11e8-95e2-f79849f70216.png)\r\nMap: OpenStreetMap contributors\r\n\r\nThat's my code:\r\n```\r\nvar buildingsURL = \"http://localhost/buildings/{z}/{x}/{y}.pbf\";\r\nvar buildingsOptions = {\r\n\trendererFactory: L.canvas.tile,\r\n    vectorTileLayerStyles: {\r\n        'buildings': { icon: new L.Icon.Default() },\r\n    },\r\n\tattribution: '',\r\n    minZoom: 12,\r\n\tmaxZoom: 22\r\n};\r\nvar buildings = L.vectorGrid.protobuf(buildingsURL, buildingsOptions);\r\n```\r\nI'm on Leaflet 1.3.4 with latest Leaflet.VectorGrid release. The PBFs have been create by OGR with default settings for buffer and extent (but since this is point data, this might not even matter?).\r\n"},"comment":{"url":"https://api.github.com/repos/Leaflet/Leaflet.VectorGrid/issues/comments/442556459","html_url":"https://github.com/Leaflet/Leaflet.VectorGrid/issues/188#issuecomment-442556459","issue_url":"https://api.github.com/repos/Leaflet/Leaflet.VectorGrid/issues/188","id":442556459,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjU1NjQ1OQ==","user":{"login":"perliedman","id":1246614,"node_id":"MDQ6VXNlcjEyNDY2MTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1246614?v=4","gravatar_id":"","url":"https://api.github.com/users/perliedman","html_url":"https://github.com/perliedman","followers_url":"https://api.github.com/users/perliedman/followers","following_url":"https://api.github.com/users/perliedman/following{/other_user}","gists_url":"https://api.github.com/users/perliedman/gists{/gist_id}","starred_url":"https://api.github.com/users/perliedman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perliedman/subscriptions","organizations_url":"https://api.github.com/users/perliedman/orgs","repos_url":"https://api.github.com/users/perliedman/repos","events_url":"https://api.github.com/users/perliedman/events{/privacy}","received_events_url":"https://api.github.com/users/perliedman/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T18:35:50Z","updated_at":"2018-11-28T18:35:50Z","author_association":"MEMBER","body":"@tomchadwin is correct, this is because of buffering. The points themselves don't need buffers, but as soon as you use a marker larger than a pixel, that marker can be cut at the tile border, since each tile is rendered clipped to its extent. This means that icons that extend across a tile border need to be present in both tiles to avoid being cut like in your screenshot."}}
{"actor":{"display_login":"perliedman"}}