Is it possible to render an element (i.e. a View) between the map and a MarkerView? #754
Unanswered
theARAking
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Hey @theARAking, I don't think your View outside of the MarkerView could ever work because I'm pretty sure that MapView renders all marker and layer type components with internal layer levels/z-indexes. I think that MarkerView is supposed to be able to handle multiple children views, and you'd have to do it that way.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I'm relatively new to React and React Native. I'm working on an Android app (using Expo) that uses MapLibre React Native, and I'm trying to make an element (i.e. a View) that must display above the map, but I also have a MarkerView that ideally should render above that element (when the MarkerView shows up in the app it allows user input and the data displayed is of more importance than that element, so ideally it should be above everything else). I've tried tweaking the zIndex and/or elevation values of the styles of the involved components, but haven't found a solution yet.
I'm not sure if this is supported by MapLibre React Native or React Native, or if it is supported and I just haven't figured it out yet. I have here a minimal example I made to demonstrate the principle behind what I'm trying to do (here is the index.tsx file):
This test app has a rather large View using absolute location with a white background just displaying some test message. Clicking on a point renders a marker view at the clicked point that just displays text with the feature ID. Is it possible to get the text in the MarkerView to render above the aforementioned View?
I'd really like to know if this is possible. Any help will be greatly appreciated. I'd really like to implement this principle in the app I'm actively working on. If it's not possible, I'll make do.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions