Issue
Currently, I'm working on a App which contain Map. in this I would like to add my camera preview as Mapview's background or layer. which means, All place markers shows only one my camera preview. . Actually concept behind in this is, when I open my camera activity, it's shows nearby place marker on it. so when I click that marker, it's shows popup which contains place details. as shown in image. How can I implement this please. please give me any idea. I have tried with camera preview on background and mapview on foreground and setAlpha(0);, and remove all layers on mapview and so on. nothing workout for me. Kindly help me to found out the solution. Thanks in advance.
Update:
This is how I have add my camera preview:
FrameLayout preview = (FrameLayout) findViewById(R.id.camera_preview);
cameraSurfaceView = new CameraSurfaceView(this);
preview.addView(cameraSurfaceView);
and this is how I have add my MapView:
<?xml version="1.0" encoding="utf-8"?>
<com.nutiteq.MapView
android:id="@+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/transparent_background" />
<FrameLayout
android:id="@+id/camera_preview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</RelativeLayout>
mapView = (MapView) findViewById(R.id.mapView);
I have tried to mapView.setAlpha(0f);
but this hide mapview together with marker. nothing could see .
I have tried to set
Canvas can = new Canvas();
can.drawColor(0x7FFFFFFF);
mapView.draw(can);
but this one also not works.
there is some method called addLayer();
but I don't know how to convert my camera preview as layer.
Solution
I'm sorry, I was totally wrong by my concept. Now everything goes well after looking into augmented reality concepts. now I'm using BeyondAR Agumented Reality SDK from here enter link description here .
Answered By - Rathakrishnan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.