public class MapInfo extends Object
A class to retrieve and provide readonly access to properties of a Meridian map.
Modifier and Type | Class and Description |
---|---|
static class |
MapInfo.ZoomLevel
An enumeration to qualify real world zoom levels.
|
Constructor and Description |
---|
MapInfo() |
Modifier and Type | Method and Description |
---|---|
static MapInfo |
fromClientLocationDataJSON(JSONObject json,
EditorKey appKey) |
static List<MapInfo> |
fromJSONArray(JSONObject json,
EditorKey appKey) |
static MapInfo |
fromJSONObject(JSONObject json,
EditorKey appKey) |
double |
getGpsMultiplier() |
Matrix |
getGpsTransform()
A transform to go from gps coordinates to map image pixels.
|
EditorKey |
getGroupKey()
The EditorKey of the map group that this map belongs to.
|
String |
getGroupName()
The human readable name of this map’s map group.
|
double |
getHeight()
The height of this maps image in pixels.
|
double |
getHeightMeters()
The height of this maps image in meters.
|
Uri |
getImageURI()
The Uri of the image associated with this map.
|
EditorKey |
getKey()
The EditorKey for this map
|
int |
getLevel()
This map’s integer floor level.
|
String |
getLevelLabel()
A human readable name for this map’s floor.
|
double |
getMaxZoom() |
double |
getMaxZoomScale() |
String |
getName()
This map’s human readable name.
|
double |
getNorthOffset()
The map’s offset from magnetic northOffset in radians.
|
EditorKey |
getOverviewKey()
The EditorKey of this map’s overview map.
|
Uri |
getSvgURI()
The Uri of the svg associated with this map.
|
double |
getUnitsPerMeter() |
double |
getWidth()
The width of this maps image in pixels.
|
double |
getWidthMeters()
The width of this maps image in meters.
|
boolean |
isDefaultMap()
True if it’s the default map of its location
|
boolean |
isInvalid()
True if the map is invalid
|
boolean |
isOutdoor()
Whether this map is outdoors.
|
PointF |
latLongToMapPoint(float latitude,
float longitude) |
PointF |
mapPointLatLong(int x,
int y) |
JSONObject |
toClientLocationDataJSON() |
float |
zoomLevelFromScale(double zoomScale) |
double |
zoomScaleFromLevel(MapInfo.ZoomLevel zoomLevel) |
public static MapInfo fromJSONObject(JSONObject json, EditorKey appKey) throws JSONException
JSONException
public static MapInfo fromClientLocationDataJSON(JSONObject json, EditorKey appKey) throws JSONException
JSONException
public JSONObject toClientLocationDataJSON() throws JSONException
JSONException
public static List<MapInfo> fromJSONArray(JSONObject json, EditorKey appKey) throws JSONException
JSONException
public PointF latLongToMapPoint(float latitude, float longitude)
public PointF mapPointLatLong(int x, int y)
public float zoomLevelFromScale(double zoomScale)
public double zoomScaleFromLevel(MapInfo.ZoomLevel zoomLevel)
public double getMaxZoomScale()
public EditorKey getKey()
The EditorKey for this map
public EditorKey getGroupKey()
The EditorKey of the map group that this map belongs to. This may be null.
public EditorKey getOverviewKey()
The EditorKey of this map’s overview map. This may be null.
public Uri getImageURI()
The Uri of the image associated with this map. This may be null.
public Uri getSvgURI()
The Uri of the svg associated with this map. This may be null.
public int getLevel()
This map’s integer floor level.
public String getName()
This map’s human readable name.
public String getGroupName()
The human readable name of this map’s map group.
public String getLevelLabel()
A human readable name for this map’s floor.
public double getWidth()
The width of this maps image in pixels.
public double getHeight()
The height of this maps image in pixels.
public double getWidthMeters()
The width of this maps image in meters.
public double getHeightMeters()
The height of this maps image in meters.
public boolean isOutdoor()
Whether this map is outdoors.
public Matrix getGpsTransform()
A transform to go from gps coordinates to map image pixels.
public double getGpsMultiplier()
public double getUnitsPerMeter()
public double getMaxZoom()
public double getNorthOffset()
The map’s offset from magnetic northOffset in radians.
public boolean isInvalid()
True if the map is invalid
public boolean isDefaultMap()
True if it’s the default map of its location