java.lang.Object | ||||
↳ | com.carto.vectorelements.VectorElement | |||
↳ | com.carto.vectorelements.Billboard | |||
↳ | com.carto.vectorelements.Popup | |||
↳ | com.carto.vectorelements.CustomPopup |
A popup with user defined handler. The handler is responsible
for drawing the bitmap for the popup and can also respond to
touch event.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CustomPopup(Billboard baseBillboard, PopupStyle style, CustomPopupHandler popupHandler)
Constructs a CustomPopup object with the specified style and attaches it to a billboard element.
| |||||||||||
CustomPopup(Geometry geometry, PopupStyle style, CustomPopupHandler popupHandler)
Constructs a CustomPopup object from a geometry object and a style.
| |||||||||||
CustomPopup(MapPos pos, PopupStyle style, CustomPopupHandler popupHandler)
Constructs a CustomPopup object from a map position and a style.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
synchronized void | delete() | ||||||||||
Bitmap |
drawBitmap(ScreenPos anchorScreenPos, float screenWidth, float screenHeight, float dpToPX)
Draws a custom bitmap for this Popup that will be used for drawing the Popup on the map.
| ||||||||||
CustomPopupHandler |
getPopupHandler()
Returns the handler used for the popup.
| ||||||||||
boolean |
processClick(ClickType clickType, MapPos clickPos, ScreenPos elementClickPos)
Handles the click events for this Popup.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs a CustomPopup object with the specified style and attaches it to a billboard element.
baseBillboard | The billboard this popup will be attached to. |
---|---|
style | The style that defines what this popup looks like. |
popupHandler | The handler to use for the popup. |
Constructs a CustomPopup object from a geometry object and a style.
geometry | The geometry object that defines the location of this popup. |
---|---|
style | The style that defines what this popup looks like. |
popupHandler | The handler to use for the popup. |
Constructs a CustomPopup object from a map position and a style.
pos | The map position that defines the location of this popup. |
---|---|
style | The style that defines what this popup looks like. |
popupHandler | The handler to use for the popup. |
Draws a custom bitmap for this Popup that will be used for drawing the Popup on the map.
The method is called each time the Popup gets reloaded internally.
anchorScreenPos | The screen position of the anchor point of this popup in pixels. |
---|---|
screenWidth | The current screen width in pixels. |
screenHeight | The current screen height in pixels. |
dpToPX | The value used for converting display independent pixels (dp) to pixels (px). |
Returns the handler used for the popup.
Handles the click events for this Popup.
clickType | The type of the click. |
---|---|
clickPos | The position of the click. |
elementClickPos | The 2D position of the click on the popup. |