public class DynamicPoiDefinition
extends java.lang.Object
| Constructor and Description |
|---|
DynamicPoiDefinition(long id,
java.lang.String name,
boolean showNameOnMap,
byte[] iconData,
float horizontalCenterPercent,
float verticalCenterPercent,
double latitude,
double longitude)
Create a poi definition.
|
DynamicPoiDefinition(long id,
java.lang.String name,
boolean showNameOnMap,
java.lang.String iconPath,
double latitude,
double longitude)
Create a poi definition.
|
DynamicPoiDefinition(long id,
java.lang.String name,
boolean showNameOnMap,
java.lang.String iconPath,
float horizontalCenterPercent,
float verticalCenterPercent,
double latitude,
double longitude)
Deprecated.
File storage access was removed in Android 10, so universal paths are not available anymore. Please use the constructor with an uri or a byte array for the POI icon instead
|
DynamicPoiDefinition(long id,
java.lang.String name,
boolean showNameOnMap,
android.net.Uri iconUri,
android.app.Activity resolveUriActivity,
double latitude,
double longitude)
Create a poi definition.
|
DynamicPoiDefinition(long id,
java.lang.String name,
boolean showNameOnMap,
android.net.Uri iconUri,
android.app.Activity resolveUriActivity,
float horizontalCenterPercent,
float verticalCenterPercent,
double latitude,
double longitude)
Create a poi definition.
|
DynamicPoiDefinition(long id,
java.lang.String name,
boolean showNameOnMap,
android.net.Uri iconUri,
android.content.ContentResolver uriResolver,
double latitude,
double longitude)
Create a poi definition.
|
DynamicPoiDefinition(long id,
java.lang.String name,
boolean showNameOnMap,
android.net.Uri iconUri,
android.content.ContentResolver uriResolver,
float horizontalCenterPercent,
float verticalCenterPercent,
double latitude,
double longitude)
Create a poi definition.
|
DynamicPoiDefinition(java.lang.String name,
double latitude,
double longitude)
Create a poi definition.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
float[] |
getColor()
Returns the color filter to apply on the POI icon.
|
float |
getHorizontalCenterPercent()
Returns the horizontal percentage of the icon at which lies the center of the icon
|
byte[] |
getIconData()
Returns the icon data as bytes array
|
java.lang.String |
getIconPath()
Deprecated.
File storage access was removed in Android 10, so universal paths are not available anymore. Please use the constructor with an uri or a byte array for the POI icon instead
|
long |
getId()
Returns the pois id
|
double |
getLatitude()
Returns the latitude of the poi
|
double |
getLongitude()
Returns the longitude of the poi
|
java.lang.String |
getName()
Returns the poi name
|
float |
getVerticalCenterPercent()
Returns the vertical percentage of the icon at which lies the center of the icon
|
int |
hashCode() |
boolean |
isShowNameOnMap()
Returns the flag that indicates if the name should be painted as a label on the map
|
void |
setColor(float r,
float g,
float b,
float a)
Sets the color filter to apply on the POI icon
|
void |
setHorizontalCenterPercent(float horizontalCenterPercent)
Sets the horizontal percentage of the icon at which lies the center of the icon
|
void |
setIconData(byte[] iconData)
Sets the icon data as bytes array
|
void |
setIconPath(java.lang.String iconPath)
Deprecated.
File storage access was removed in Android 10, so universal paths are not available anymore. Please use the constructor with an uri or a byte array for the POI icon instead
|
void |
setIconUri(android.net.Uri iconUri,
android.app.Activity resolveUriActivity)
Sets the uri of the poi icon file
|
void |
setIconUri(android.net.Uri iconUri,
android.content.ContentResolver uriResolver)
Sets the uri of the poi icon file
|
void |
setId(long id)
Set the pois id (useful to set if the intent sender does not specify the pois id)
|
void |
setName(java.lang.String name)
Sets the poi name
|
void |
setVerticalCenterPercent(float verticalCenterPercent)
Sets the vertical percentage of the icon at which lies the center of the icon
|
java.lang.String |
toLBGeoJSONFeature()
Generates and returns the json representation of this POI
|
java.lang.String |
toString() |
public DynamicPoiDefinition(java.lang.String name,
double latitude,
double longitude)
name - the display name of the poilatitude - the latitude of the poilongitude - the longitude of the poipublic DynamicPoiDefinition(long id,
java.lang.String name,
boolean showNameOnMap,
java.lang.String iconPath,
double latitude,
double longitude)
id - The id of the defined poiname - the display name of the poishowNameOnMap - True if the name should be shown on the mapiconPath - The path to the icon to use. May be nulllatitude - the latitude of the poilongitude - the longitude of the poipublic DynamicPoiDefinition(long id,
java.lang.String name,
boolean showNameOnMap,
android.net.Uri iconUri,
android.app.Activity resolveUriActivity,
double latitude,
double longitude)
id - The id of the defined poiname - the display name of the poishowNameOnMap - True if the name should be shown on the mapiconUri - The uri of the icon to use. May be nullresolveUriActivity - The activity of the content resolver that is required to transform the uri into the raw icon data. May be nulllatitude - the latitude of the poilongitude - the longitude of the poipublic DynamicPoiDefinition(long id,
java.lang.String name,
boolean showNameOnMap,
android.net.Uri iconUri,
android.content.ContentResolver uriResolver,
double latitude,
double longitude)
id - The id of the defined poiname - the display name of the poishowNameOnMap - True if the name should be shown on the mapiconUri - The uri of the icon to use. May be nulluriResolver - The content resolver that is required to transform the uri into the raw icon data. May be nulllatitude - the latitude of the poilongitude - the longitude of the poi@Deprecated
public DynamicPoiDefinition(long id,
java.lang.String name,
boolean showNameOnMap,
java.lang.String iconPath,
float horizontalCenterPercent,
float verticalCenterPercent,
double latitude,
double longitude)
id - The id of the defined poiname - the display name of the poishowNameOnMap - True if the name should be shown on the mapiconPath - The path to the icon to use. May be nullhorizontalCenterPercent - The horizontal center of the icon, in percentage of the whole icon widthverticalCenterPercent - The vertical center of the icon, in percentage of the whole icons heightlatitude - the latitude of the poilongitude - the longitude of the poipublic DynamicPoiDefinition(long id,
java.lang.String name,
boolean showNameOnMap,
byte[] iconData,
float horizontalCenterPercent,
float verticalCenterPercent,
double latitude,
double longitude)
id - The id of the defined poiname - the display name of the poishowNameOnMap - True if the name should be shown on the mapiconData - The icon ataas bytes arrayhorizontalCenterPercent - The horizontal center of the icon, in percentage of the whole icon widthverticalCenterPercent - The vertical center of the icon, in percentage of the whole icons heightlatitude - the latitude of the poilongitude - the longitude of the poipublic DynamicPoiDefinition(long id,
java.lang.String name,
boolean showNameOnMap,
android.net.Uri iconUri,
android.app.Activity resolveUriActivity,
float horizontalCenterPercent,
float verticalCenterPercent,
double latitude,
double longitude)
id - The id of the defined poiname - the display name of the poishowNameOnMap - True if the name should be shown on the mapiconUri - The uri of the icon to use. May be nullresolveUriActivity - The activity of the content resolver that is required to transform the uri into the raw icon data. May be nullhorizontalCenterPercent - The horizontal center of the icon, in percentage of the whole icon widthverticalCenterPercent - The vertical center of the icon, in percentage of the whole icons heightlatitude - the latitude of the poilongitude - the longitude of the poipublic DynamicPoiDefinition(long id,
java.lang.String name,
boolean showNameOnMap,
android.net.Uri iconUri,
android.content.ContentResolver uriResolver,
float horizontalCenterPercent,
float verticalCenterPercent,
double latitude,
double longitude)
id - The id of the defined poiname - the display name of the poishowNameOnMap - True if the name should be shown on the mapiconUri - The uri of the icon to use. May be nulluriResolver - The content resolver that is required to transform the uri into the raw icon data. May be nullhorizontalCenterPercent - The horizontal center of the icon, in percentage of the whole icon widthverticalCenterPercent - The vertical center of the icon, in percentage of the whole icons heightlatitude - the latitude of the poilongitude - the longitude of the poipublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toLBGeoJSONFeature()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic long getId()
@Deprecated public java.lang.String getIconPath()
@Deprecated public void setIconPath(java.lang.String iconPath)
iconPath - The path to setpublic void setIconUri(android.net.Uri iconUri,
android.app.Activity resolveUriActivity)
iconUri - The uri of the icon fileresolveUriActivity - The activity of the content resolver that is required to transform the uri into the raw icon data. May be nullpublic void setIconUri(android.net.Uri iconUri,
android.content.ContentResolver uriResolver)
iconUri - The uri of the icon fileuriResolver - The content resolver that is required to transform the uri into the raw icon data. May be nullpublic void setIconData(byte[] iconData)
iconData - The icon data as bytes arraypublic byte[] getIconData()
public double getLatitude()
public double getLongitude()
public java.lang.String getName()
public void setName(java.lang.String name)
name - The name to setpublic boolean isShowNameOnMap()
public float getHorizontalCenterPercent()
public void setHorizontalCenterPercent(float horizontalCenterPercent)
horizontalCenterPercent - The percentage to setpublic float getVerticalCenterPercent()
public void setVerticalCenterPercent(float verticalCenterPercent)
verticalCenterPercent - The percentage to setpublic float[] getColor()
public void setColor(float r,
float g,
float b,
float a)
r - The red component [0..1]g - The yellow component [0..1]b - The blue component [0..1]a - The alpha component [0..1]public void setId(long id)
id - the id