public class MapInfo
extends java.lang.Object
A class to retrieve and provide read-only 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(org.json.JSONObject json,
EditorKey appKey) |
static java.util.List<MapInfo> |
fromJSONArray(org.json.JSONObject json,
EditorKey appKey) |
static MapInfo |
fromJSONObject(org.json.JSONObject json,
EditorKey appKey) |
double |
getGpsMultiplier()
Multiplier for latitude vs longitude multiplier to adjust aspect ratio (affected by distance from equator)
|
android.graphics.Matrix |
getGpsTransform()
A transform for converting between this map’s coordinate space and GPS coordinates.
|
EditorKey |
getGroupKey()
The EditorKey of the map group that this map belongs to.
|
java.lang.String |
getGroupName()
The human readable name of this map’s map group.
|
double |
getHeight()
The height of this map’s image in pixels.
|
double |
getHeightMeters()
The height of this map’s image in meters.
|
android.net.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.
|
java.lang.String |
getLevelLabel()
A human readable name for this map’s floor.
|
double |
getMaxZoom()
The map’s maximum zoom scale.
|
double |
getMaxZoomScale()
Get the maximum zoom scale for the map.
|
java.lang.String |
getName()
This map’s human readable name.
|
double |
getNorth()
The map’s rotation as set in the editor in radians.
|
double |
getNorthOffset()
The map’s offset from magnetic northOffset in radians.
|
EditorKey |
getOverviewKey()
The EditorKey of this map’s overview map.
|
android.net.Uri |
getSvgURI()
The URI of the SVG associated with this map.
|
double |
getUnitsPerMeter()
The number of map distance units per meter.
|
double |
getWidth()
The width of this map’s image in pixels.
|
double |
getWidthMeters()
The width of this map’s 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.
|
boolean |
isPublished()
True if the map is published
|
android.graphics.PointF |
latLongToMapPoint(float latitude,
float longitude)
Convert from latitude and longitude to a point on the map.
|
android.graphics.PointF |
mapPointLatLong(float x,
float y)
Get the latitude and longitude of a map point.
|
android.graphics.PointF |
mapPointLatLong(int x,
int y)
Deprecated.
Use float version instead.
|
org.json.JSONObject |
toClientLocationDataJSON() |
float |
zoomLevelFromScale(double zoomScale)
Convert from scale to
MapInfo.ZoomLevel . |
double |
zoomScaleFromLevel(MapInfo.ZoomLevel zoomLevel)
Convert from
MapInfo.ZoomLevel to scale. |
public static MapInfo fromJSONObject(org.json.JSONObject json, EditorKey appKey) throws org.json.JSONException
org.json.JSONException
public static MapInfo fromClientLocationDataJSON(org.json.JSONObject json, EditorKey appKey) throws org.json.JSONException
org.json.JSONException
public org.json.JSONObject toClientLocationDataJSON() throws org.json.JSONException
org.json.JSONException
public static java.util.List<MapInfo> fromJSONArray(org.json.JSONObject json, EditorKey appKey) throws org.json.JSONException
org.json.JSONException
public android.graphics.PointF latLongToMapPoint(float latitude, float longitude)
Convert from latitude and longitude to a point on the map.
latitude
- Latitude of the point to convert.longitude
- Longitude of the point to convert.public android.graphics.PointF mapPointLatLong(int x, int y)
Get the latitude and longitude of a map point.
x
- X coordinate of map point to convert.y
- Y coordinate of map point to convert.public android.graphics.PointF mapPointLatLong(float x, float y)
Get the latitude and longitude of a map point.
x
- X coordinate of map point to convert.y
- Y coordinate of map point to convert.public float zoomLevelFromScale(double zoomScale)
Convert from scale to MapInfo.ZoomLevel
.
zoomScale
- zoom scale to convert.MapInfo.ZoomLevel
.public double zoomScaleFromLevel(MapInfo.ZoomLevel zoomLevel)
Convert from MapInfo.ZoomLevel
to scale.
zoomLevel
- MapInfo.ZoomLevel
to convert.public double getMaxZoomScale()
Get the maximum zoom scale for the map.
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 android.net.Uri getImageURI()
The URI of the image associated with this map. This may be null.
public android.net.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 java.lang.String getName()
This map’s human readable name.
public java.lang.String getGroupName()
The human readable name of this map’s map group.
public java.lang.String getLevelLabel()
A human readable name for this map’s floor.
public double getWidth()
The width of this map’s image in pixels.
public double getHeight()
The height of this map’s image in pixels.
public double getWidthMeters()
The width of this map’s image in meters.
public double getHeightMeters()
The height of this map’s image in meters.
public boolean isOutdoor()
Whether this map is outdoors.
public android.graphics.Matrix getGpsTransform()
A transform for converting between this map’s coordinate space and GPS coordinates.
public double getGpsMultiplier()
Multiplier for latitude vs longitude multiplier to adjust aspect ratio (affected by distance from equator)
public double getUnitsPerMeter()
The number of map distance units per meter.
public double getMaxZoom()
The map’s maximum zoom scale.
public double getNorthOffset()
The map’s offset from magnetic northOffset in radians.
public double getNorth()
The map’s rotation as set in the editor in radians.
public boolean isInvalid()
True if the map is invalid
public boolean isDefaultMap()
True if it’s the default map of its location
public boolean isPublished()
True if the map is published