Package | Description |
---|---|
net.java.html.leaflet |
Leaflet API for Java built around the
Map class. |
net.java.html.leaflet.event |
Listeners and events for the leaflet API
|
Modifier and Type | Method and Description |
---|---|
LatLng |
Map.containerPointToLatLng(Point point)
Returns the geographical coordinates of a given map container point.
|
LatLng |
Map.getCenter()
Returns the geographical center of the map view.
|
LatLng |
LatLngBounds.getCenter()
Returns the center point of the bounds.
|
LatLng |
Popup.getLatLng()
Returns the geographical point of popup.
|
LatLng |
Marker.getLatLng()
Returns the current geographical position of the marker.
|
LatLng |
Circle.getLatLng()
Returns the current geographical position of the circle.
|
LatLng[] |
PolyLine.getLatLngs()
Returns an array of the points in the path.
|
LatLng[][] |
MultiPolyline.getLatLngs()
Returns an array of arrays of geographical points in each line.
|
LatLng[][] |
MultiPolygon.getLatLngs()
Returns an array of arrays of geographical points in each polygon.
|
LatLng |
LatLngBounds.getNorthEast()
Returns the north-east point of the bounds.
|
LatLng |
LatLngBounds.getNorthWest()
Returns the north-west point of the bounds.
|
LatLng |
LatLngBounds.getSouthEast()
Returns the south-east point of the bounds.
|
LatLng |
LatLngBounds.getSouthWest()
Returns the south-west point of the bounds.
|
LatLng |
Map.layerPointToLatLng(Point point)
Returns the geographical coordinates of a given map layer point.
|
LatLng |
ICRS.pointToLatLng(Point point,
int zoom)
The inverse of
latLngToPoint . |
LatLng[] |
PolyLine.spliceLatLngs(int index,
int pointsToRemove,
LatLng... latlngs)
Allows adding, removing or replacing points in the polyline.
|
LatLng |
Map.unproject(Point point)
Projects the given absolute pixel coordinates to geographical coordinates
for the given zoom level (current zoom level by default).
|
LatLng |
IProjection.unproject(Point point)
The inverse of
project . |
LatLng |
Map.unproject(Point point,
int zoom)
Projects the given absolute pixel coordinates to geographical coordinates
for the given zoom level (current zoom level by default).
|
LatLng |
LatLng.wrap(double left,
double right)
Returns a new LatLng object with the longitude wrapped around left and right boundaries (-180 to 180 by default).
|
Modifier and Type | Method and Description |
---|---|
Rectangle |
Rectangle.addLatLng(LatLng latlng)
Adds a given point to the rectangle.
|
PolyLine |
PolyLine.addLatLng(LatLng latlng)
Adds a given point to the polyline.
|
Polygon |
Polygon.addLatLng(LatLng latlng)
Adds a given point to the polygon.
|
boolean |
LatLngBounds.contains(LatLng latLng)
Returns
true if the rectangle contains the given point. |
double |
LatLng.distanceTo(LatLng other)
Returns the distance (in meters) to the given LatLng calculated using the
Haversine formula.
|
void |
LatLngBounds.extend(LatLng latLng)
Extends the bounds to contain the given point.
|
Point |
Map.latLngToContainerPoint(LatLng latlng)
Returns the map container point that corresponds to the given
geographical coordinates.
|
Point |
Map.latLngToLayerPoint(LatLng latlng)
Returns the map layer point that corresponds to the given geographical
coordinates (useful for placing overlays on the map).
|
Point |
ICRS.latLngToPoint(LatLng latlng,
int zoom)
Projects geographical coordinates on a given zoom into pixel coordinates.
|
Map |
Map.openPopup(Popup popup,
LatLng latlng)
Opens the specified popup while closing the previously opened (to make
sure only one is opened at one time for usability).
|
Map |
Map.openPopup(Popup popup,
LatLng latlng,
PopupOptions options)
Opens the specified popup while closing the previously opened (to make
sure only one is opened at one time for usability).
|
Map |
Map.openPopup(String html,
LatLng latlng)
Creates a popup and opens it in the given point on a map.
|
Point |
Map.project(LatLng latlng)
Projects the given geographical coordinates to absolute pixel coordinates
for the given zoom level (current zoom level by default).
|
Point |
IProjection.project(LatLng latlng)
Projects geographical coordinates into a 2D point.
|
Point |
ICRS.project(LatLng latlng)
Projects geographical coordinates into coordinates in units accepted for
this CRS (e.g. meters for
EPSG:3857 , for passing it to WMS
services). |
Point |
Map.project(LatLng latlng,
int zoom)
Projects the given geographical coordinates to absolute pixel coordinates
for the given zoom level (current zoom level by default).
|
MapOptions |
MapOptions.setCenter(LatLng latLng)
Initial geographical center of the map.
|
Popup |
Popup.setLatLng(LatLng latLng)
Sets the geographical point where the popup will open.
|
void |
Marker.setLatLng(LatLng latlng)
Changes the marker position to the given point.
|
CircleMarker |
CircleMarker.setLatLng(LatLng latlng)
Changes the marker position to the given point.
|
Circle |
Circle.setLatLng(LatLng latlng)
Changes the circle position to the given point.
|
Rectangle |
Rectangle.setLatLngs(LatLng[] latlngs)
Replaces all the points in the rectangle with the given array of
geographical points.
|
PolyLine |
PolyLine.setLatLngs(LatLng[] latlngs)
Replaces all the points in the polyline with the given array of
geographical points.
|
Polygon |
Polygon.setLatLngs(LatLng[] latlngs)
Replaces all the points in the polygon with the given array of geographical points.
|
MultiPolyline |
MultiPolyline.setLatLngs(LatLng[][] latlngs)
Replace all lines and their paths with the given array of arrays of
geographical points.
|
MultiPolygon |
MultiPolygon.setLatLngs(LatLng[][] latlngs)
Replace all polygons and their paths with the given array of arrays of
geographical points.
|
void |
Map.setView(LatLng center)
Sets the view of the map (geographical center and zoom) with the given
animation options.
|
void |
Map.setView(LatLng center,
int zoom)
Sets the view of the map (geographical center and zoom) with the given
animation options.
|
void |
Map.setView(LatLng center,
int zoom,
ZoomPanOptions options)
Sets the view of the map (geographical center and zoom) with the given
animation options.
|
LatLng[] |
PolyLine.spliceLatLngs(int index,
int pointsToRemove,
LatLng... latlngs)
Allows adding, removing or replacing points in the polyline.
|
Constructor and Description |
---|
Circle(LatLng latlng,
double radius)
Instantiates a circle object given a geographical point and a radius in
meters.
|
Circle(LatLng latlng,
double radius,
PathOptions options)
Instantiates a circle object given a geographical point, a radius in
meters and an options object.
|
CircleMarker(LatLng latlng)
Instantiates a circle marker given a geographical point.
|
CircleMarker(LatLng latlng,
PathOptions options)
Instantiates a circle marker given a geographical point and an options
object.
|
LatLngBounds(LatLng[] latLngs)
Creates a LatLngBounds object defined by the geographical points it
contains.
|
LatLngBounds(LatLng southWest,
LatLng northEast)
Creates a latLngBounds object by defining south-west and north-east
corners of the rectangle.
|
Marker(LatLng latLng)
Instantiates a Marker object given a geographical point.
|
Marker(LatLng latLng,
MarkerOptions options)
Instantiates a Marker object given a geographical point and an options
object.
|
MultiPolygon(LatLng[][] latlngs)
Instantiates a multi-polygon object given an array of latlngs arrays (one
for each individual polygon).
|
MultiPolygon(LatLng[][] latlngs,
PolyLineOptions options)
Instantiates a multi-polygon object given an array of latlngs arrays (one
for each individual polygon) and an options object.
|
MultiPolyline(LatLng[][] latlngs)
Instantiates a multi-polyline object given an array of arrays of
geographical points (one for each individual polyline).
|
MultiPolyline(LatLng[][] latlngs,
PolyLineOptions options)
Instantiates a multi-polyline object given an array of arrays of
geographical points (one for each individual polyline) and an options
object.
|
Polygon(LatLng[] latlngs)
Instantiates a polygon object given an array of geographical points.
|
Polygon(LatLng[] latlngs,
PolyLineOptions options)
Instantiates a polygon object given an array of geographical points and an options object (the same as for Polyline).
|
PolyLine(LatLng[] latlngs)
Instantiates a polyline object given an array of geographical points.
|
PolyLine(LatLng[] latlngs,
PolyLineOptions options)
Instantiates a polyline object given an array of geographical points and an options object.
|
Modifier and Type | Method and Description |
---|---|
LatLng |
LocationEvent.getLatlng() |
LatLng |
MouseEvent.getLatLng() |
Constructor and Description |
---|
LocationEvent(Object src,
String type,
LatLng latlng,
LatLngBounds bounds,
double accuracy,
double altitude,
double altitudeAccuracy,
double heading,
double speed,
double timestamp) |
MouseEvent(Object src,
String type,
LatLng latlng,
Point layerPoint,
Point containerPoint) |
Copyright © 2017. All rights reserved.