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 enum
An enumeration to qualify real world zoom levels. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MapInfo
fromClientLocationDataJSON
(JSONObject json, EditorKey appKey) fromJSONArray
(JSONObject json, EditorKey appKey) static MapInfo
fromJSONObject
(JSONObject json, EditorKey appKey) double
Multiplier for latitude vs longitude multiplier to adjust aspect ratio (affected by distance from equator)A 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.double
The height of this map’s image in pixels.double
The height of this map’s image in meters.The URI of the image associated with this map.getKey()
The EditorKey for this map.int
getLevel()
This map’s integer floor level.A human readable name for this map’s floor.double
The map’s maximum zoom scale.double
Get the maximum zoom scale for the map.getName()
This map’s human readable name.double
getNorth()
The map’s rotation as set in the editor in radians.double
The map’s offset from magnetic northOffset in radians.The EditorKey of this map’s overview map.The URI of the SVG associated with this map.double
The number of map distance units per meter.double
getWidth()
The width of this map’s image in pixels.double
The width of this map’s image in meters.boolean
True if it’s the default map of its locationboolean
True if the map is invalidboolean
Whether this map is outdoors.boolean
True if the map is publishedlatLongToMapPoint
(float latitude, float longitude) Convert from latitude and longitude to a point on the map.mapPointLatLong
(float x, float y) Get the latitude and longitude of a map point.float
zoomLevelFromScale
(double zoomScale) Convert from scale toMapInfo.ZoomLevel
.double
zoomScaleFromLevel
(MapInfo.ZoomLevel zoomLevel) Convert fromMapInfo.ZoomLevel
to scale.
-
Constructor Details
-
MapInfo
public MapInfo()
-
-
Method Details
-
fromJSONObject
- Throws:
JSONException
-
fromClientLocationDataJSON
public static MapInfo fromClientLocationDataJSON(JSONObject json, EditorKey appKey) throws JSONException - Throws:
JSONException
-
toClientLocationDataJSON
- Throws:
JSONException
-
fromJSONArray
- Throws:
JSONException
-
latLongToMapPoint
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
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.ZoomLevel
to scale.- Parameters:
zoomLevel
-MapInfo.ZoomLevel
to 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
The URI of the image associated with this map.This may be null.
-
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
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
-