Issue
Need to overlay two views. A GLSurfaceView and a MapView. My map view is following the code from the following Github location:
The GLSurfaceView needs to be on top of the map view which I believe I just use
zOrderOnTop(true);
However, I do not know how to add this second view to the class. I've been attempting to work with this Stack Overflow question:
How to overlay GLSurfaceView over a MapView in Android?
but have not been able to get it to work... Any suggestions would be appreciated.
Also, from observing the developers reference guide about MapViews, there is a note that says: "You are advised NOT to add children to this view." Would overlaying a GLSurfaceView be adding a child to the MapView?
Solution
I asked a similar question to this one that had my source code. I seemed to have found a solution that works currently however, not sure how elegant it is...
GLSurfaceView not appearing over MapView
Basically, I separated my views (MapView and GLSurfaceView) into two fragments. Then I called them from an Activity. The fragments occupied the same area and the GLSurfaceView is called after the MapView.
This works for me. Please let me know if there is a simpler/more elegant way of doing this.
Answered By - Beren
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.