Skip to content

Padding in flyTo for customLayer is unfit #346

@mohridwanhdp

Description

@mohridwanhdp

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], }) } />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions