| Package | Description |
|---|---|
| com.codename1.maps |
The mapping API allows developers to use maps in their applications, add layers
on top of the map and to enhance the API with additional Layers, Providers and functionality.
|
| com.codename1.maps.layers |
The Layers are elements that are displayed on the map.
|
| com.codename1.maps.providers |
These are the map providers, currently http://www.openstreetmap.org/ is supported.
|
| Modifier and Type | Method and Description |
|---|---|
Coord |
MapComponent.center()
Deprecated.
Gets the center of the map.
|
static Coord |
Mercator.forwardMercator(double latitude,
double longitude)
Create a projected Mercator Coord from the given coordinate
|
abstract Coord |
Projection.fromWGS84(Coord wgs84)
Converts a given WGS84 coordinate to a projection coordinate
|
Coord |
Mercator.fromWGS84(Coord wgs84)
Create a projected Mercator Coord from the given coordinate
|
Coord[] |
Projection.fromWGS84(Coord[] coords)
a utility method that converts an array of WGS84 coordinate to the
projection coordinates system.
|
Coord |
MapComponent.getCenter()
Deprecated.
Gets the center location of the map in WGS84 format.
|
Coord |
MapComponent.getCoordFromPosition(int x,
int y)
Deprecated.
Gets the Coord location on the map from a x, y position.
|
Coord |
BoundingBox.getNorthEast()
Gets the north east coordinate
|
Coord |
BoundingBox.getSouthWest()
Gets the /south west coordinate
|
static Coord |
Mercator.inverseMercator(double latitude,
double longitude)
Create a unprojected Coord(Latitude, Longitude) from the projected Coord
|
Coord |
Tile.position(int posX,
int posY)
Returns the Coordinate of the given x, y position on the tile
|
abstract Coord |
Projection.toWGS84(Coord projection)
Converts a projected coordinate to a WGS84 coordinate
|
Coord |
Mercator.toWGS84(Coord projection)
Create a Coord(Latitude, Longitude) from the projected Coord
|
Coord |
Coord.translate(Coord coordinates)
Create a new Coord object which is translated with the given coordinates
|
Coord |
Coord.translate(double latitude,
double longitude)
Create a new Coord object which is translated with the given coordinates
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
BoundingBox.contains(Coord cur)
indicates if the given coordinate is inside the counding box
|
static BoundingBox |
BoundingBox.create(Coord[] coords)
create a smallest bounding box that contains all of the given coordinates
|
abstract Coord |
Projection.fromWGS84(Coord wgs84)
Converts a given WGS84 coordinate to a projection coordinate
|
Coord |
Mercator.fromWGS84(Coord wgs84)
Create a projected Mercator Coord from the given coordinate
|
Coord[] |
Projection.fromWGS84(Coord[] coords)
a utility method that converts an array of WGS84 coordinate to the
projection coordinates system.
|
Point |
MapComponent.getPointFromCoord(Coord coord)
Deprecated.
Gets the screen coordinates of a specific Coord
|
void |
MapListener.mapPositionUpdated(Component source,
int zoom,
Coord center)
Invoked when the map is zoomed or panned
|
Point |
Tile.pointPosition(Coord point)
Returns the x, y point of the given coordinate relative to this tile
|
abstract Coord |
Projection.toWGS84(Coord projection)
Converts a projected coordinate to a WGS84 coordinate
|
Coord |
Mercator.toWGS84(Coord projection)
Create a Coord(Latitude, Longitude) from the projected Coord
|
Coord |
Coord.translate(Coord coordinates)
Create a new Coord object which is translated with the given coordinates
|
void |
MapComponent.zoomTo(Coord coord,
int zoomLevel)
Deprecated.
Zoom map to the center of the given coordinate with the given zoom level
|
| Constructor and Description |
|---|
BoundingBox(Coord southWest,
Coord northEast)
Constructor with 2 coordinates for south west and north east
|
BoundingBox(Coord c,
double rLat,
double rLng)
Creates a bounding box around a coordinate with a given radius.
|
Coord(Coord toClone)
Copy Constructor
|
MapComponent(MapProvider provider,
Coord centerPosition,
int zoomLevel)
Deprecated.
Constructor
|
MapComponent(MapProvider provider,
Coord centerPosition,
int zoomLevel,
boolean cacheEnabled)
Deprecated.
Constructor
|
| Modifier and Type | Class and Description |
|---|---|
class |
PointLayer
Do not use this layer directly, you need to add this layer into a PointsLayer class
instance in order for it to work as expected!
|
| Modifier and Type | Method and Description |
|---|---|
void |
LinesLayer.addLineSegment(Coord[] coords)
Adds a Line segment to the Layer
|
protected void |
LinesLayer.paintSegment(Graphics g,
Coord[] segment,
Tile tile)
Paint a segment.
|
protected void |
ArrowLinesLayer.paintSegment(Graphics g,
Coord[] segment,
Tile tile)
Paints arrows on each segment.
|
| Constructor and Description |
|---|
PointLayer(Coord position,
String name,
Image icon)
Creates a Point Layer.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Coord |
MapProvider.scale(int zoomLevel)
Scale is the distance in map units between each pixel in tile at given zoom level.
|
Coord |
TiledProvider.scale(int zoomLevel)
Scale to the zoom level
|
Coord |
MapProvider.translate(Coord position,
int zoomLevel,
int pixelsX,
int pixelsY)
Translates position by [pixelsX, pixelsY] at zoomLevel acordingly to maps scale.
|
| Modifier and Type | Method and Description |
|---|---|
abstract BoundingBox |
MapProvider.bboxFor(Coord position,
int zoomLevel)
Returns the bounding box of a position ina given zoom level
|
BoundingBox |
TiledProvider.bboxFor(Coord position,
int zoomLevel)
Returns the bounding box of a position ina given zoom level
|
Coord |
MapProvider.translate(Coord position,
int zoomLevel,
int pixelsX,
int pixelsY)
Translates position by [pixelsX, pixelsY] at zoomLevel acordingly to maps scale.
|
Copyright © 2021. All rights reserved.