Class PTRMapMarker
-
- All Implemented Interfaces:
public class PTRMapMarker
-
-
Field Summary
Fields Modifier and Type Field Description private Boolean
isVisible
private final String
id
private final Double
latitude
private final Double
longitude
private final Double
maxZoomLevel
private final Double
minZoomLevel
private final Level
level
private final View
view
private Float
offsetX
private Float
offsetY
-
Method Summary
Modifier and Type Method Description final Boolean
isVisible()
final Unit
setVisible(Boolean isVisible)
final String
getId()
final Double
getLatitude()
final Double
getLongitude()
final Double
getMaxZoomLevel()
final Double
getMinZoomLevel()
final Level
getLevel()
final View
getView()
final Float
getOffsetX()
final Unit
setOffsetX(Float offsetX)
final Float
getOffsetY()
final Unit
setOffsetY(Float offsetY)
Boolean
equals(Object other)
Integer
hashCode()
-
-
Constructor Detail
-
PTRMapMarker
PTRMapMarker(String id, Double latitude, Double longitude, Double maxZoomLevel, Double minZoomLevel, Level level, View view, Float offsetX, Float offsetY)
- Parameters:
id
-required to set the marker identifier, random UUID is generated by default
latitude
-latitude of the marker where it should be shown on the map
longitude
-longitude of the marker where it should be shown on the map
maxZoomLevel
-maximum zoom level allowed for view to be visible, PTRMapFragment.maximumAllowedZoomLevel by default
minZoomLevel
-minimum zoom level allowed for view to be visible, 0 by default.
level
-level on which marker has to be shown,
null
by default which means visible on all levels.
view
-view to be display on the pointed location
offsetX
-the offset value in dp of which the marker will be shifted on the x-axis. When the marker is added, it is anchored from the top left corner to the given location. e.g. if the marker should shift to the left by 50dp, this should be -50.
offsetY
-the offset value in dp of which the marker will be shifted on the y-axis. When the marker is added, it is anchored from the top left corner to the given location. e.g. if the marker should shift up by 160dp, this should be -160.
-
-
Method Detail
-
setVisible
final Unit setVisible(Boolean isVisible)
-
getLatitude
final Double getLatitude()
-
getLongitude
final Double getLongitude()
-
getMaxZoomLevel
final Double getMaxZoomLevel()
-
getMinZoomLevel
final Double getMinZoomLevel()
-
getOffsetX
final Float getOffsetX()
-
setOffsetX
final Unit setOffsetX(Float offsetX)
- Parameters:
offsetX
-the offset value in dp of which the marker will be shifted on the x-axis. When the marker is added, it is anchored from the top left corner to the given location. e.g. if the marker should shift to the left by 50dp, this should be -50.
-
getOffsetY
final Float getOffsetY()
-
setOffsetY
final Unit setOffsetY(Float offsetY)
- Parameters:
offsetY
-the offset value in dp of which the marker will be shifted on the y-axis. When the marker is added, it is anchored from the top left corner to the given location. e.g. if the marker should shift up by 160dp, this should be -160.
-
-
-
-