Strange Clipping issue.
ibrierley opened this issue · comments
This may be related to the other clipping issue, not sure. I note if I bypass clipping it works ok.
Example geojson..
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-178, 10],[20, 85],[178, -5]
]
]
},
"style": {
"stroke-width": "3",
"fill-opacity": 0.6
},
"className": {
"baseVal": "highway_primary"
}
}
In the demo page, it produces for the top layer, which is ok...
But then if you click on the top right quadrant of the demo page, it gives..
And also seems to add lines on tile boundaries (I can't highlight that on the demo page, as it has tile lines there, but as an example from mine..
This is the same on this version in Git, and the hosted demo page. (I've also eliminated wrap and simplify to test further)
Can you try it with the line string closed (last point the same as the first one), as required by the GeoJSON spec for polygons?
ok thanks, that kinda makes sense, but there are still odd tile edge lines...(which aren't there if I comment out the clip code. This is the closed triangle.
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-178, 10],[20, 85],[178, -5],[-178, 10]
]
]
},
"style": {
"stroke-width": "3",
"fill-opacity": 0.6
},
"className": {
"baseVal": "highway_primary"
}
}
Just to clarify, thats zoomed into zoom 2 (and thats a screenshot from my version, I think the demo obscures those, as the demo draws borders alongside tile edges anyway.
Actually, is this just a question of whether it's a filled polygon (as you'd use a linestring for an unfilled one) as geojson probably doesn't declare about that? I suspect it's fine isn't it!
Thanks for the help, the original non-closing of the polygon threw my brain about the problem :).