urbica / react-map-gl

React Component Library for Mapbox GL JS

Home Page:https://urbica.github.io/react-map-gl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Padding in flyTo for customLayer is unfit

mohridwanhdp opened this issue · comments

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