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

Padding in flyTo for customLayer is unfit #346

Open
mohridwanhdp opened this issue Sep 21, 2021 · 0 comments
Open

Padding in flyTo for customLayer is unfit #346

mohridwanhdp opened this issue Sep 21, 2021 · 0 comments

Comments

@mohridwanhdp
Copy link

I use flyTo with padding inside
map.flyTo({ center: [ longitude, latitude ], zoom: newZoom, speed: 1, padding: { top: 100, bottom: 100, left: 600, right: 50 }, });

But the point in custom layer is shifting

using padding
image

_not using padding _
image

The orange one is using CustomLayer

<CustomLayer layer={ new MapboxLayer({ id: "radius-" + i._id, data: geojson.features, type: ScatterplotLayer, radiusUnits: "meters", pickable: true, opacity: 0.1, stroked: false, filled: true, radiusScale: 1, lineWidthMinPixels: 1, getPosition: (d) => d.geometry.coordinates, getRadius: 1000, getFillColor: (d) => [255, 140, 0], }) } />

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

1 participant