Class MapInfo

java.lang.Object
com.arubanetworks.meridian.maps.MapInfo
All Implemented Interfaces:
Serializable

public class MapInfo extends Object implements Serializable
A class to retrieve and provide read-only access to properties of a Meridian map.
See Also:
  • Constructor Details

    • MapInfo

      public MapInfo()
  • Method Details

    • fromJSONObject

      public static MapInfo fromJSONObject(JSONObject json, EditorKey appKey) throws JSONException
      Throws:
      JSONException
    • fromClientLocationDataJSON

      public static MapInfo fromClientLocationDataJSON(JSONObject json, EditorKey appKey) throws JSONException
      Throws:
      JSONException
    • toClientLocationDataJSON

      public JSONObject toClientLocationDataJSON() throws JSONException
      Throws:
      JSONException
    • fromJSONArray

      public static List<MapInfo> fromJSONArray(JSONObject json, EditorKey appKey) throws JSONException
      Throws:
      JSONException
    • latLongToMapPoint

      public 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 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 to MapInfo.ZoomLevel.
      Parameters:
      zoomScale - zoom scale to convert.
      Returns:
      resulting MapInfo.ZoomLevel.
    • zoomScaleFromLevel

      public double zoomScaleFromLevel(MapInfo.ZoomLevel zoomLevel)
      Convert from MapInfo.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

      public EditorKey getKey()
      The EditorKey for this map.
    • getGroupKey

      public EditorKey getGroupKey()
      The EditorKey of the map group that this map belongs to.

      This may be null.

    • getOverviewKey

      public EditorKey getOverviewKey()
      The EditorKey of this map’s overview map.

      This may be null.

    • getImageURI

      public Uri getImageURI()
      The URI of the image associated with this map.

      This may be null.

    • getSvgURI

      public 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

      public String getName()
      This map’s human readable name.
    • getGroupName

      public String getGroupName()
      The human readable name of this map’s map group.
    • getLevelLabel

      public String 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 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