public class Placemark
extends java.lang.Object
implements java.io.Serializable
Container for a Meridian Placemark and its related fields
Constructor and Description |
---|
Placemark()
An empty Placemark constructor.
|
Modifier and Type | Method and Description |
---|---|
static Placemark |
fromClientLocationDataJSON(org.json.JSONObject json,
EditorKey appKey)
Static initializer for creating a Placemark from its json representation with extra location data.
|
static java.util.List<Placemark> |
fromJSONArray(org.json.JSONArray json,
java.lang.String locationId)
Static initializer for creating an List of Placemarks from its json representation.
|
static Placemark |
fromJSONObject(org.json.JSONObject json,
java.lang.String locationId)
Static initializer for creating a Placemark from its json representation.
|
static Placemark |
fromJSONObjectAndAppKey(org.json.JSONObject json,
EditorKey appKey)
Static initializer for creating a Placemark from its json representation.
|
Polygon |
getArea()
The area on its parent Meridian Map that this placemark represents.
|
int |
getColor()
The shading color of this placemark, this is based on its
type and should be used to color any UI representing this placemark. |
android.location.Location |
getCoordinates()
Gets Location object containing latitude and longitude of the placemark if available.
|
java.lang.String |
getDescription()
The human readable description of this Placemark
|
java.lang.String |
getEmail()
Returns the email address associated with this placemark.
|
java.lang.String |
getImageURL()
Returns an image representing this placemark.
|
EditorKey |
getKey()
Gets the Meridian EditorKey for this Placemark.
|
short |
getMajor()
If this placemark represents a Beacon this will be the Beacon’s major identifier.
|
MapInfo.ZoomLevel |
getMaxZoomLevel()
The maximum zoom level that this placmark should be visible at on its parent Meridian Map.
|
short |
getMinor()
If this placemark represents a Beacon this will be the Beacon’s minor identifier.
|
MapInfo.ZoomLevel |
getMinZoomLevel()
The minimum zoom level that this placmark should be visible at on its parent Meridian Map.
|
java.lang.String |
getName()
The human readable name of this Placemark (e.g.
|
java.lang.String |
getPhone()
Returns the phone number associated with this placemark.
|
EditorKey |
getRelatedMapKey()
The Meridian Key for a Map that this Placemark is connected to, this will not be the same as the parent key of the
key . |
double |
getRSSIOffset()
If this placemark represents a Beacon this will be the Beacon’s RSSI offset.
|
java.lang.String |
getType()
The Meridian Placemark type of this placemark.
|
java.lang.String |
getTypeCategory()
Get the human readable type category of this Meridian placemark type.
|
java.lang.String |
getTypeName()
The Human readable name of this Meridian Placemark type.
|
java.lang.String |
getUID()
A unique identifier to link this placemark to objects outside of the Meridian Editor.
|
java.lang.String |
getUrl()
Returns the url associated with this placemark.
|
float |
getX()
This placemark’s x coordinate on its parent Meridian Map.
|
float |
getY()
This placemark’s y coordinate on its parent Meridian Map.
|
boolean |
isDisabled()
Returns true if the placemark is disabled.
|
boolean |
isFacility()
Returns true if the placemark is a facility.
|
boolean |
isHideOnMap()
Indicates if the placemark should be visible on its parent Meridian Map.
|
boolean |
isInvalid()
Returns true if the placemark does not represent a point on a map.
|
java.lang.String |
majorMinorString()
Gets the major/minor of this placemark if it represents a Beacon.
|
void |
setArea(Polygon area)
Set the area on its parent Meridian Map that this placemark represents.
|
void |
setColor(int color)
Sets the shading color of this placemark.
|
void |
setCoordinates(android.location.Location coordinates)
Set this placemark’s coordinates (latitude & longitude).
|
void |
setDescription(java.lang.String description)
Sets the human readable description of this Placemark
|
void |
setDisabled(boolean disabled)
Sets if the placemark is disabled.
|
void |
setEmail(java.lang.String email)
Sets the email address associated with this placemark.
|
void |
setFacility(boolean facility)
Sets if the placemark is a facility.
|
void |
setHideOnMap(boolean hideOnMap)
Sets if the placemark should be visible on its parent Meridian Map.
|
void |
setImageURL(java.lang.String imageURL)
Sets an image representing this placemark.
|
void |
setKey(EditorKey key)
Sets the Meridian EditorKey for this Placemark.
|
void |
setMajor(short major)
If this placemark represents a Beacon this will set the Beacon’s major identifier.
|
void |
setMaxZoomLevel(MapInfo.ZoomLevel maxZoomLevel)
Sets the maximum zoom level that this placmark should be visible at on its parent Meridian Map.
|
void |
setMinor(short minor)
If this placemark represents a Beacon this will set the Beacon’s minor identifier.
|
void |
setMinZoomLevel(MapInfo.ZoomLevel minZoomLevel)
Sets the minimum zoom level that this placmark should be visible at on its parent Meridian Map.
|
void |
setName(java.lang.String name)
Sets the human readable name of this Placemark (e.g.
|
void |
setPhone(java.lang.String phone)
Sets the phone number associated with this placemark.
|
void |
setRelatedMapKey(EditorKey relatedMapKey)
Sets the Meridian Key for a Map that this Placemark is connected to, this will not be the same as the parent key of the
key . |
void |
setType(java.lang.String type)
Sets the Meridian Placemark type of this placemark.
|
void |
setTypeCategory(java.lang.String typeCategory)
Sets the human readable type category of this Meridian placemark type.
|
void |
setTypeName(java.lang.String typeName)
Sets the Human readable name of this Meridian Placemark type.
|
void |
setUrl(java.lang.String url)
Sets the url associated with this placemark.
|
void |
setX(float x)
Set this placemark’s x coordinate on its parent Meridian Map.
|
void |
setY(float y)
Set this placemark’s y coordinate on its parent Meridian Map.
|
org.json.JSONObject |
toClientLocationDataJSONObject()
Converts Placemark to its Client Location Data JSON representation data.
|
java.lang.String |
toString() |
public EditorKey getKey()
Gets the Meridian EditorKey for this Placemark.
public void setKey(EditorKey key)
Sets the Meridian EditorKey for this Placemark.
public EditorKey getRelatedMapKey()
The Meridian Key for a Map that this Placemark is connected to, this will not be the same as the parent key of the key
.
public void setRelatedMapKey(EditorKey relatedMapKey)
Sets the Meridian Key for a Map that this Placemark is connected to, this will not be the same as the parent key of the key
.
public java.lang.String getName()
The human readable name of this Placemark (e.g. ‘Joe’s Office’, ‘Fountain’)
public void setName(java.lang.String name)
Sets the human readable name of this Placemark (e.g. ‘Joe’s Office’, ‘Fountain’)
public java.lang.String getDescription()
The human readable description of this Placemark
public void setDescription(java.lang.String description)
Sets the human readable description of this Placemark
public java.lang.String getType()
The Meridian Placemark type of this placemark. (e.g. ‘shop’, ’lounge)
public void setType(java.lang.String type)
Sets the Meridian Placemark type of this placemark. (e.g. ‘shop’, ’lounge)
public java.lang.String getTypeName()
The Human readable name of this Meridian Placemark type.
public void setTypeName(java.lang.String typeName)
Sets the Human readable name of this Meridian Placemark type.
public java.lang.String getTypeCategory()
Get the human readable type category of this Meridian placemark type.
public void setTypeCategory(java.lang.String typeCategory)
Sets the human readable type category of this Meridian placemark type.
public java.lang.String getUID()
A unique identifier to link this placemark to objects outside of the Meridian Editor.
public float getX()
This placemark’s x coordinate on its parent Meridian Map.
public void setX(float x)
Set this placemark’s x coordinate on its parent Meridian Map.
public float getY()
This placemark’s y coordinate on its parent Meridian Map.
public void setY(float y)
Set this placemark’s y coordinate on its parent Meridian Map.
public android.location.Location getCoordinates()
Gets Location object containing latitude and longitude of the placemark if available.
public void setCoordinates(android.location.Location coordinates)
Set this placemark’s coordinates (latitude & longitude).
public int getColor()
The shading color of this placemark, this is based on its type
and should be used to color any UI representing this placemark.
public void setColor(int color)
Sets the shading color of this placemark.
public MapInfo.ZoomLevel getMaxZoomLevel()
The maximum zoom level that this placmark should be visible at on its parent Meridian Map.
public void setMaxZoomLevel(MapInfo.ZoomLevel maxZoomLevel)
Sets the maximum zoom level that this placmark should be visible at on its parent Meridian Map.
public MapInfo.ZoomLevel getMinZoomLevel()
The minimum zoom level that this placmark should be visible at on its parent Meridian Map.
public void setMinZoomLevel(MapInfo.ZoomLevel minZoomLevel)
Sets the minimum zoom level that this placmark should be visible at on its parent Meridian Map.
public boolean isHideOnMap()
Indicates if the placemark should be visible on its parent Meridian Map.
public void setHideOnMap(boolean hideOnMap)
Sets if the placemark should be visible on its parent Meridian Map.
public short getMajor()
If this placemark represents a Beacon this will be the Beacon’s major identifier.
public void setMajor(short major)
If this placemark represents a Beacon this will set the Beacon’s major identifier.
public double getRSSIOffset()
If this placemark represents a Beacon this will be the Beacon’s RSSI offset.
public short getMinor()
If this placemark represents a Beacon this will be the Beacon’s minor identifier.
public void setMinor(short minor)
If this placemark represents a Beacon this will set the Beacon’s minor identifier.
public Polygon getArea()
The area on its parent Meridian Map that this placemark represents.
public void setArea(Polygon area)
Set the area on its parent Meridian Map that this placemark represents.
public boolean isFacility()
Returns true if the placemark is a facility.
public void setFacility(boolean facility)
Sets if the placemark is a facility.
public boolean isDisabled()
Returns true if the placemark is disabled.
public void setDisabled(boolean disabled)
Sets if the placemark is disabled.
public java.lang.String getImageURL()
Returns an image representing this placemark.
public void setImageURL(java.lang.String imageURL)
Sets an image representing this placemark.
public java.lang.String getUrl()
Returns the url associated with this placemark.
public void setUrl(java.lang.String url)
Sets the url associated with this placemark.
public java.lang.String getEmail()
Returns the email address associated with this placemark.
public void setEmail(java.lang.String email)
Sets the email address associated with this placemark.
public java.lang.String getPhone()
Returns the phone number associated with this placemark.
public void setPhone(java.lang.String phone)
Sets the phone number associated with this placemark.
public static Placemark fromJSONObjectAndAppKey(org.json.JSONObject json, EditorKey appKey) throws org.json.JSONException
Static initializer for creating a Placemark from its json representation.
json
- A known json representation of the Placemark to be initialized.appKey
- A known Meridian App key for the initialized placemark.org.json.JSONException
- on JSON parsing errorfromJSONArray(org.json.JSONArray, String)
,
fromJSONObject(org.json.JSONObject, String)
,
fromClientLocationDataJSON(org.json.JSONObject, EditorKey)
public static Placemark fromJSONObject(org.json.JSONObject json, java.lang.String locationId) throws org.json.JSONException
Static initializer for creating a Placemark from its json representation.
json
- A known json representation of the Placemark to be initialized.locationId
- A known Meridian location id for the initialized placemark.org.json.JSONException
- on JSON parsing errorfromJSONArray(org.json.JSONArray, String)
,
fromJSONObjectAndAppKey(org.json.JSONObject, EditorKey)
,
fromClientLocationDataJSON(org.json.JSONObject, EditorKey)
public static Placemark fromClientLocationDataJSON(org.json.JSONObject json, EditorKey appKey) throws org.json.JSONException
Static initializer for creating a Placemark from its json representation with extra location data.
json
- A known json representation of the Placemark to be initialized.appKey
- A known Meridian App key for the initialized placemark.org.json.JSONException
- on JSON parsing errorfromJSONArray(org.json.JSONArray, String)
,
fromJSONObject(org.json.JSONObject, String)
,
fromJSONObjectAndAppKey(org.json.JSONObject, EditorKey)
public org.json.JSONObject toClientLocationDataJSONObject() throws org.json.JSONException
Converts Placemark to its Client Location Data JSON representation data.
org.json.JSONException
- on JSON encoding errorpublic static java.util.List<Placemark> fromJSONArray(org.json.JSONArray json, java.lang.String locationId) throws org.json.JSONException
Static initializer for creating an List of Placemarks from its json representation.
json
- A json representation of the Placemark List.locationId
- A known Meridian location id for the placemarks in the list.org.json.JSONException
- on JSON parsing errorfromClientLocationDataJSON(org.json.JSONObject, EditorKey)
,
fromJSONObject(org.json.JSONObject, String)
,
fromJSONObjectAndAppKey(org.json.JSONObject, EditorKey)
public java.lang.String majorMinorString()
Gets the major/minor of this placemark if it represents a Beacon.
public boolean isInvalid()
Returns true if the placemark does not represent a point on a map.
@NonNull public java.lang.String toString()
toString
in class java.lang.Object