question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UserLocation/ Camera: not able to set vertical alignment of position

See original GitHub issue

Describe the bug Old version had a MapView property to set the userLocationVerticalAlignment. Camera/ UserLocation seem to have shed that property.

Camera does indeed has an interface for alignment, however it didn’t seem to be finished and is also not passed through to the native side.

To Reproduce Try using the alignment property on Camera. Notice, that the UserLocation will still be dead center on the MapView instead of on the bottom or top part of the map.

Expected behavior Using the alignment property will move the UserLocation either to the top or bottom part of the map

Screenshots na

Versions (please complete the following information):

  • Platform: Android/ iOS
  • Device: Android LGQ7
  • Emulator/ Simulator: no
  • OS: Android/ iOS
  • SDK Version: irrelevant
  • React Native Version: 0.61.5

Additional context na

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
ferdicuscommented, Apr 13, 2020

Hey @dorthwein, yeah, it does exactly what the docs say (if I’ve only read them earlier 😛)

The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport.

This is how I use it to offset from the top, which will move everything further down. contentInset={[400, 0, 0, 0]}

Edit: This is on Android, haven’t tested on iOS

Read more comments on GitHub >

github_iconTop Results From Across the Web

UserLocation/ Camera: not able to set vertical alignment of ...
Try using the alignment property on Camera . Notice, that the UserLocation will still be dead center on the MapView instead of on...
Read more >
Vertical align table-cell don't work with position absolute
The text should be placed in the middle of my "table cell". Everything works as expected until I add "position: absolute". Now it...
Read more >
Location - Android Developers
Constant used to specify formatting of a latitude or longitude in the form ... Returns true if this location has a vertical accuracy,...
Read more >
Create overlays in your prototypes - Figma Help Center
Note: You can't set a different position for the new overlay. Figma places the new overlay in the same position as the original...
Read more >
vertical-align - CSS: Cascading Style Sheets - MDN Web Docs
The vertical-align CSS property sets vertical alignment of an inline, inline-block or table-cell box.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found