Package com.anylogic.engine.gis
- java.lang.Object
- com.anylogic.engine.gis.AbstractGISRouteProvider
- All Implemented Interfaces:
IGISRouteProvider
,IRouteProvider<Curve<GISMarkupSegment>>
,Serializable
- Direct Known Subclasses:
AbstractGISRouteProviderWithCache
,PlainGISRouteProvider
@AnyLogicInternalAPI public abstract class AbstractGISRouteProvider extends Object implements IGISRouteProvider
- See Also:
- Serialized Form
Constructor | Description |
---|---|
AbstractGISRouteProvider() |
Modifier and Type | Method | Description |
---|---|---|
final double | getDistance |
Calculates distance by route with intermediate points.
|
final Curve<GISMarkupSegment> | getPathData |
Create route with intermediate points specified by pairs of latitude and longitude.
|
final Curve<GISMarkupSegment> | getPathData |
Creates route from one point to another.
|
int | getPrecisionInMeters() | |
boolean | isThrowError() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
void | setPrecisionInMeters | |
AbstractGISRouteProvider | setRouteNotFoundBehavior |
Configures this route provider to either throw error or
create a straight route if the requested
route can't be found (applicable for route providers
supporting route search).
|
void | setThrowError |
Deprecated.
|
public AbstractGISRouteProvider()
public void setPrecisionInMeters(int precisionInMeters)
public int getPrecisionInMeters()
public final Curve<GISMarkupSegment> getPathData(double startLat, double startLon, double endLat, double endLon)
Description copied from interface:
IGISRouteProvider
Creates route from one point to another.
- Specified by:
getPathData
in interfaceIGISRouteProvider
- Parameters:
startLat
- the latitude of the 1st point, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)startLon
- the longitude of the 1st point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)endLat
- the latitude of the 2nd point, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)endLon
- the longitude of the 2nd point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)- Returns:
- the route from one point to another
public final Curve<GISMarkupSegment> getPathData(double... latLonPoints)
Description copied from interface:
IGISRouteProvider
Create route with intermediate points specified by pairs of latitude and longitude.
- Specified by:
getPathData
in interfaceIGISRouteProvider
- Parameters:
latLonPoints
- the array of coordinates ([latitude1, longitude1, latitude2, longitude2, ... latitudeN, longitudeN])- Returns:
- the curve which sequentially connects all specified points
public final double getDistance(double... latLonPoints)
Description copied from interface:
IGISRouteProvider
Calculates distance by route with intermediate points.
- Specified by:
getDistance
in interfaceIGISRouteProvider
- Parameters:
latLonPoints
- the array of coordinates ([latitude1, longitude1, latitude2, longitude2, ... latitudeN, longitudeN])- Returns:
- the distance of route which sequentially connects all specified points
@AnyLogicInternalAPI public boolean isThrowError()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
@Deprecated public void setThrowError(boolean throwError)
Deprecated.
public AbstractGISRouteProvider setRouteNotFoundBehavior(GISRouteNotFoundBehavior behavior)
Configures this route provider to either throw error or
create a straight route if the requested
route can't be found (applicable for route providers
supporting route search).
- Parameters:
behavior
- the behavior- Returns:
- this object, for convenience
setRouteNotFoundBehavior(GISRouteNotFoundBehavior)