Answer the question
In order to leave comments, you need to log in
What should be the overlay?
Hey! I'm trying to make an overlay on top of Yandex maps.
Here is from the documentation
// Получаем объект MapView
final MapView mMapView = (MapView) findViewById(R.id.map);
// Получаем объект MapController
MapController mMapController = mapView.getMapController();
// Получаем объект OverlayManager
OverlayManager mOverlayManager = mMapController.getOverlayManager();
//Добавляем новый слой
mOverlayManager.addOverlay(overlay);
Answer the question
In order to leave comments, you need to log in
I don’t know exactly how it is, but in web maps, the overlay is no different from the main map, except that it assumes that the main part is transparent there.
Overlay is a layer on your map.
Before adding it, you need to create it:
Overlay overlayName = new Overlay(mMapController)
Then you can create various objects on the map and add them to your layer. At the end you add this layer to the manager:
mOverlayManager.addOverlay(overlayName);
There are examples on github:
https://github.com/yandexmobile/yandexmapkit-android
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question