Closed estherooi closed 4 years ago
Hi @estherooi . What do you mean by visual context? Basically there are now two types of AR objects: lane and maneuver fence. API is present to customize them a bit. Please take a look at this link for a small sample video and at API reference.
Hi @kiryldz what I mean by POI was the little icon showing the details of the particular building. Is that possible to create it? Thanks!
If we assume that POI objects are 2D you could do the following.
Input: POI's latitude (poiLat
), POI's longitude (poiLon
), POI's ground offset in meters (poiOffset
).
var worldPos = VisionManager.geoToWorld(GeoCoordinate(poiLat, poiLon))
worldPos.z += poiOffset
val pixelCoords = VisionManager.worldToPixel(worldPos)
worldPos.x
:
val poiScale = if (worldPos.x >= 1) 1.0f / worldPos.x else 0.0f
VideoSourceListener.onNewFrame()
) and scale. This should be enough for you to implement custom view of frame size and display frame itself + POI on it.@kiryldz alright, i will try to it. Thanks a lot!
hi @kiryldz how to create 2D marker at destination when user arrive?
var worldPos = VisionManager.geoToWorld(GeoCoordinate(poiLat, poiLon)) worldPos.z += poiOffset val pixelCoords = VisionManager.worldToPixel(worldPos)
but I don't really understand in kotlin. Is there any Java version? WorldCoordinate worldPos = VisionManager.geoToWorld(new GeoCoordinate(Rlat, Rlong));
double z = worldPos.getZ();
PixelCoordinate pixelCoord = VisionManager.worldToPixel(worldPos);
Is it like this if the code is in Java? Hi @estherooi - please check POI 2D example.
Closing due to inactivity.
I'd also added that we now have detailed tutorial about drawing POIs, https://docs.mapbox.com/help/tutorials/android-vision-poi-drawing/
Hi, I am a student doing my final year project, I managed to run the AR navigation project, however I would like to add visual context to the AR navigation, can anyone provide me step by step guidance in this? thanks a lot!