Initial position issue
See original GitHub issueHi,
I see animation on first pass. fitBounds
don’t change. Why?
const markerLocation = [ displayLocation[1], displayLocation[0] ]; // <lng>, <lat>
<ReactMapboxGl style="mapbox://styles/mapbox/dark-v9"
accessToken={ accessToken }
containerStyle={{ height: '100%' }}
interactive={ false }
fitBounds={ this.getBounds(displayLocation) }
fitBoundsOptions={ {offset: [0, -100]} }>
<Layer type="symbol" id="marker" layout={{ 'icon-image': 'marker-15' }}>
<Feature coordinates={ markerLocation } />
</Layer>
</ReactMapboxGl>
Looking through the code but can’t really figure out what’s going on: https://github.com/alex3165/react-mapbox-gl/blob/master/src/map.tsx#L140
PS: setting center
breaks fitBounds
.
Issue Analytics
- State:
- Created 7 years ago
- Comments:19 (9 by maintainers)
Top Results From Across the Web
Initial position · Issue #80 · daybrush/moveable - GitHub
I'm creating an editor, so I need to load my elements to the page dynamically. So the question is how properly to set...
Read more >d3-drag with html elements initial position issue - Stack Overflow
In the snippet below I have div , when I first start draging the div around it jumps slightly to the right, making...
Read more >position - CSS: Cascading Style Sheets - MDN Web Docs
The position CSS property sets how an element is positioned in a document. The top, right, bottom, and left properties determine the final ......
Read more >CSS position: sticky scroll initial position into view
For the purposes of any operation targetting the scroll position of a sticky positioned element (or one of its descendants), the sticky ...
Read more >Initial Position Definition | Law Insider
Initial Position means the amount of Registrable Securities owned by a Participating Shareholder as of the Effective Date, as set forth on Schedule...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
While this issue has been resolved.
fitBounds
still animates on first pass. I solved that by disabling animation during first render:Yep seems reasonable, I will publish a patch with the update