public class MapboxConversions
extends java.lang.Object
Inspired by mapbox-unity-sdk/sdkproject/Assets/Mapbox/Unity/Utilities/Conversions.cs
https://github.com/mapbox/mapbox-unity-sdk/| Modifier and Type | Class and Description |
|---|---|
static class |
MapboxConversions.JMapAnnotationGeoElement |
static class |
MapboxConversions.MapboxAnnotationProperties |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ANNOTATION_TEXT_PROPERTY_KEY |
static java.lang.String |
ANNOTATION_TEXT_ROTATE_PROPERTY_KEY |
static java.lang.String |
ANNOTATION_TEXT_SIZE_PROPERTY_KEY |
static int |
DEFAULT_TILE_SIZE |
static java.lang.String |
LABEL_TEXT_PROPERTY_KEY |
static int |
MAX_ZOOM |
static int |
MIN_ZOOM |
| Constructor and Description |
|---|
MapboxConversions() |
| Modifier and Type | Method and Description |
|---|---|
static MapboxConversions.MapboxAnnotationProperties |
getMapboxAnnotationPropertiesAtMaxZoom(Annotation annotation,
Projection sourceProjection) |
static double |
getMeanLatitudeForProject(JMapServerProject jMapServerProject)
Returns the mean latitude for a JMap Server Layer.
|
static double |
resolutionToScale(double resolution,
double latitude)
Compute scale for resolution.
|
static double |
resolutionToZoom(double resolution,
int tileSize,
int defaultZoom,
double latitude)
Compute zoom for resolution.
|
static double |
scaleToZoom(double scale,
int tileSize,
int defaultZoom,
double latitude)
Compute zoom for scale.
|
static Rectangle |
tileToProjectedBounds(int x,
int y,
int zoom,
int tileSize)
Gets the tile bounds in meters from an xy tile ID.
|
static double |
zoomToResolution(int zoom,
int tileSize,
double latitude)
Compute resolution for zoom and tile size.
|
public static final int MIN_ZOOM
public static final int MAX_ZOOM
public static final int DEFAULT_TILE_SIZE
public static final java.lang.String ANNOTATION_TEXT_PROPERTY_KEY
public static final java.lang.String ANNOTATION_TEXT_ROTATE_PROPERTY_KEY
public static final java.lang.String ANNOTATION_TEXT_SIZE_PROPERTY_KEY
public static final java.lang.String LABEL_TEXT_PROPERTY_KEY
public static Rectangle tileToProjectedBounds(int x, int y, int zoom, int tileSize)
x - y - zoom - tileSize - public static double getMeanLatitudeForProject(JMapServerProject jMapServerProject)
jMapServerProject - public static double resolutionToScale(double resolution,
double latitude)
resolution - public static double resolutionToZoom(double resolution,
int tileSize,
int defaultZoom,
double latitude)
resolution - tileSize - public static double scaleToZoom(double scale,
int tileSize,
int defaultZoom,
double latitude)
scale - tileSize - public static double zoomToResolution(int zoom,
int tileSize,
double latitude)
zoom - tileSize - public static MapboxConversions.MapboxAnnotationProperties getMapboxAnnotationPropertiesAtMaxZoom(Annotation annotation, Projection sourceProjection)