Package com.arubanetworks.meridian.maps
Class MapInfo
java.lang.Object
com.arubanetworks.meridian.maps.MapInfo
- All Implemented Interfaces:
Serializable
A class to retrieve and provide read-only access to properties of a Meridian map.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAn enumeration to qualify real world zoom levels. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MapInfofromClientLocationDataJSON(org.json.JSONObject json, EditorKey appKey) fromJSONArray(org.json.JSONObject json, EditorKey appKey) static MapInfofromJSONObject(org.json.JSONObject json, EditorKey appKey) doubleMultiplier for latitude vs longitude multiplier to adjust aspect ratio (affected by distance from equator)android.graphics.MatrixA transform for converting between this map’s coordinate space and GPS coordinates.The EditorKey of the map group that this map belongs to.The human readable name of this map’s map group.doubleThe height of this map’s image in pixels.doubleThe height of this map’s image in meters.android.net.UriThe URI of the image associated with this map.getKey()The EditorKey for this map.intgetLevel()This map’s integer floor level.A human readable name for this map’s floor.doubleThe map’s maximum zoom scale.doubleGet the maximum zoom scale for the map.getName()This map’s human readable name.doublegetNorth()The map’s rotation as set in the editor in radians.doubleThe map’s offset from magnetic northOffset in radians.The EditorKey of this map’s overview map.android.net.UriThe URI of the SVG associated with this map.doubleThe number of map distance units per meter.doublegetWidth()The width of this map’s image in pixels.doubleThe width of this map’s image in meters.booleanTrue if it’s the default map of its locationbooleanTrue if the map is invalidbooleanWhether this map is outdoors.booleanTrue if the map is publishedandroid.graphics.PointFlatLongToMapPoint(float latitude, float longitude) Convert from latitude and longitude to a point on the map.android.graphics.PointFmapPointLatLong(float x, float y) Get the latitude and longitude of a map point.org.json.JSONObjectfloatzoomLevelFromScale(double zoomScale) Convert from scale toMapInfo.ZoomLevel.doublezoomScaleFromLevel(MapInfo.ZoomLevel zoomLevel) Convert fromMapInfo.ZoomLevelto scale.
-
Constructor Details
-
MapInfo
public MapInfo()
-
-
Method Details
-
fromJSONObject
public static MapInfo fromJSONObject(org.json.JSONObject json, EditorKey appKey) throws org.json.JSONException - Throws:
org.json.JSONException
-
fromClientLocationDataJSON
public static MapInfo fromClientLocationDataJSON(org.json.JSONObject json, EditorKey appKey) throws org.json.JSONException - Throws:
org.json.JSONException
-
toClientLocationDataJSON
public org.json.JSONObject toClientLocationDataJSON() throws org.json.JSONException- Throws:
org.json.JSONException
-
fromJSONArray
public static List<MapInfo> fromJSONArray(org.json.JSONObject json, EditorKey appKey) throws org.json.JSONException - Throws:
org.json.JSONException
-
latLongToMapPoint
public android.graphics.PointF latLongToMapPoint(float latitude, float longitude) Convert from latitude and longitude to a point on the map.- Parameters:
latitude- Latitude of the point to convert.longitude- Longitude of the point to convert.- Returns:
- The corresponding point on the map.
-
mapPointLatLong
public android.graphics.PointF mapPointLatLong(float x, float y) Get the latitude and longitude of a map point.- Parameters:
x- X coordinate of map point to convert.y- Y coordinate of map point to convert.- Returns:
- The (latitude, longitude) of the map point in PointF structure.
-
zoomLevelFromScale
public float zoomLevelFromScale(double zoomScale) Convert from scale toMapInfo.ZoomLevel.- Parameters:
zoomScale- zoom scale to convert.- Returns:
- resulting
MapInfo.ZoomLevel.
-
zoomScaleFromLevel
Convert fromMapInfo.ZoomLevelto scale.- Parameters:
zoomLevel-MapInfo.ZoomLevelto convert.- Returns:
- resulting zoom scale.
-
getMaxZoomScale
public double getMaxZoomScale()Get the maximum zoom scale for the map.- Returns:
- resulting maximum zoom scale.
-
getKey
The EditorKey for this map. -
getGroupKey
The EditorKey of the map group that this map belongs to.This may be null.
-
getOverviewKey
The EditorKey of this map’s overview map.This may be null.
-
getImageURI
public android.net.Uri getImageURI()The URI of the image associated with this map.This may be null.
-
getSvgURI
public android.net.Uri getSvgURI()The URI of the SVG associated with this map.This may be null.
-
getLevel
public int getLevel()This map’s integer floor level. -
getName
This map’s human readable name. -
getGroupName
The human readable name of this map’s map group. -
getLevelLabel
A human readable name for this map’s floor. -
getWidth
public double getWidth()The width of this map’s image in pixels. -
getHeight
public double getHeight()The height of this map’s image in pixels. -
getWidthMeters
public double getWidthMeters()The width of this map’s image in meters. -
getHeightMeters
public double getHeightMeters()The height of this map’s image in meters. -
isOutdoor
public boolean isOutdoor()Whether this map is outdoors. -
getGpsTransform
public android.graphics.Matrix getGpsTransform()A transform for converting between this map’s coordinate space and GPS coordinates. -
getGpsMultiplier
public double getGpsMultiplier()Multiplier for latitude vs longitude multiplier to adjust aspect ratio (affected by distance from equator)- Returns:
- Multiplier for latitude vs longitude multiplier to adjust aspect ratio.
-
getUnitsPerMeter
public double getUnitsPerMeter()The number of map distance units per meter. -
getMaxZoom
public double getMaxZoom()The map’s maximum zoom scale. -
getNorthOffset
public double getNorthOffset()The map’s offset from magnetic northOffset in radians. -
getNorth
public double getNorth()The map’s rotation as set in the editor in radians. -
isInvalid
public boolean isInvalid()True if the map is invalid -
isDefaultMap
public boolean isDefaultMap()True if it’s the default map of its location -
isPublished
public boolean isPublished()True if the map is published
-