Книги автора: Beginning Android
Книга: 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.
Оглавление статьи/книги
Похожие страницы
- Classes
- Chapter 4 Classes and Objects
- Using Partial Classes
- Static Classes
- Sealed Classes and Methods
- Generic Classes
- Working with Files Using the File and FileInfo Classes
- Глава 4 Корневой раздел HKEY_CLASSES_ROOT
- 17. Object Reorientation: Classes
- Overriding the Power State Configuration for Device Classes
- Generic Functions and Classes
- Drawing the ItemizedOverlay