Книга: Beginning Android

Overlay Classes

Overlay Classes

Any overlay you want to add to your map needs to be implemented as a subclass of Overlay. There is an ItemizedOverlay subclass available if you are looking to add push-pins or the like; ItemizedOverlay simplifies this process.

To attach an overlay class to your map, just call getOverlays() on your MapView and add() your Overlay instance to it:

marker.setBounds(0, 0, marker.getIntrinsicWidth(),
 marker.getIntrinsicHeight());
map.getOverlays().add(new SitesOverlay(marker));

We will explain that marker in just a bit.

Оглавление книги

Оглавление статьи/книги

Генерация: 1.769. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз