Interface LocationProvider
-
public interface LocationProvider
Interface to provide a location for a given element, as a PointD with longitude, latitude coordinates.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PointD
getLonLat(java.lang.Object element)
Returns the longitude, latitude for the element or null if this elements doesn't have a location.boolean
setLonLat(java.lang.Object element, double lon, double lat)
Set the longitude, latitude for the element.
-
-
-
Method Detail
-
getLonLat
PointD getLonLat(java.lang.Object element)
Returns the longitude, latitude for the element or null if this elements doesn't have a location.- Parameters:
element
- the element for which to return the corresponding geo-location- Returns:
- the geo-location
-
setLonLat
boolean setLonLat(java.lang.Object element, double lon, double lat)
Set the longitude, latitude for the element. Returns true if the change occurred, i.e. the operation was legal. Use setLonLat(element, getLonLat(element).x, getLonLat(element).y) to check without side-effect.- Parameters:
element
- the element for which to set the geo-locationlon
- the new longitudelat
- the new latitude- Returns:
- true if the geo-location could be set, or false, if the location is read-only
-
-