You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constMINIMAP_PADDING=40// should be smaller than SIZE/2constSIZE=200// actual size is size - paddingconstpoly={"type": "Feature","properties": {},"geometry": {"type": "Polygon","coordinates": [[[13.056508703137666,52.362012953186536],[13.055221242810262,52.36091224014757],[13.057088060284428,52.36012599975746],[13.058139486218977,52.36137087391279],[13.056508703137666,52.362012953186536]]]}}constfc={'type': 'FeatureCollection','features': [poly]}constprojection=geoMercator().fitExtent([[MINIMAP_PADDING,MINIMAP_PADDING],[SIZE-MINIMAP_PADDING,SIZE-MINIMAP_PADDING]],fc)constgeoGenerator=geoPath().projection(projection)
results in a projection with scale 19.098593171019434 and translate of [100, 99.99999999997485]
if i now get the path and display the poly with something like
there seems to be a problem with the calculation of the bounding box of the poly but I'm not familiar enough with the lib to pinpoint where this happens. the poly seems to get clipped and this results in a to big bounding box
if i calculate the bbox with something like turf i don't have this problem. if i calculate the scale & translate myself it comes out to something like scale 2225147.3776166504 translate [-506971.1720894703, 2395335.8344671903]
The text was updated successfully, but these errors were encountered:
I looked at this a little more and i guess the poly is in the wrong winding order for d3 and thus creates a big square with a little hole in it that i couldn't see (because the image was very small and i only used outline)
looks kinda strange to me but if this the intended behaviour the ticket can be closed
results in a projection with scale
19.098593171019434
and translate of[100, 99.99999999997485]
if i now get the path and display the poly with something like
i get a super small path that is barely visible
there seems to be a problem with the calculation of the bounding box of the poly but I'm not familiar enough with the lib to pinpoint where this happens. the poly seems to get clipped and this results in a to big bounding box
if i calculate the bbox with something like turf i don't have this problem. if i calculate the scale & translate myself it comes out to something like scale
2225147.3776166504
translate[-506971.1720894703, 2395335.8344671903]
The text was updated successfully, but these errors were encountered: