java.lang.Object | |||
↳ | com.carto.vectorelements.VectorElement | ||
↳ | com.carto.vectorelements.Billboard | ||
↳ | com.carto.vectorelements.Popup |
![]() |
An abstract billboard element that can be displayed on the map. It
always faces the camera and has a dynamically drawn bitmap.
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.
| ||||||||||
float |
getAnchorPointX()
Returns the horizontal anchor point of this popup.
| ||||||||||
float |
getAnchorPointY()
Returns the vertical anchor point of this popup.
| ||||||||||
PopupStyle |
getStyle()
Returns the style of this Popup.
| ||||||||||
boolean |
processClick(ClickType clickType, MapPos clickPos, ScreenPos elementClickPos)
Handles the click events for this Popup.
| ||||||||||
void |
setAnchorPoint(float anchorPointX, float anchorPointY)
Sets the anchor point for the popup.
| ||||||||||
void |
setAnchorPointX(float anchorPointX)
Sets the horizontal anchor point for the popup.
| ||||||||||
void |
setAnchorPointY(float anchorPointY)
Sets the vertical anchor point for the popup.
| ||||||||||
void |
setStyle(PopupStyle style)
Sets the style for this Popup.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
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 horizontal anchor point of this popup.
Returns the vertical anchor point of this popup.
Returns the style of this 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. |
Sets the anchor point for the popup. It should only be called from
Popup::drawBitmap method, to match the anchor point to the drawn bitmap.
Values will be clamped to [-1, 1] range.
anchorPointX | The new horizontal anchor point for the popup. -1 means the left side, 0 the center and 1 the right side of the popup. The default is 0. |
---|---|
anchorPointY | The vertical anchor point for the popup. -1 means the bottom, 0 the center and 1 the top of the popup. The default is -1. |
Sets the horizontal anchor point for the popup. It should only be called from
Popup::drawBitmap method, to match the anchor point to the drawn bitmap.
anchorPointX | The new horizontal anchor point for the popup. -1 means the left side, 0 the center and 1 the right side of the popup. The default is 0. |
---|
Sets the vertical anchor point for the popup. It should only be called from
Popup::drawBitmap method, to match the anchor point to the drawn bitmap.
anchorPointY | The vertical anchor point for the popup. -1 means the bottom, 0 the center and 1 the top of the popup. The default is -1. |
---|
Sets the style for this Popup.
style | The new style that defines what this popup looks like. |
---|