public class VgMyRoutingHelper extends java.lang.Object implements VgMyRouteCreator, VgMyRouteDisplay, VgMyPoiConfigurationSetter
Modifier and Type | Class and Description |
---|---|
class |
VgMyRoutingHelper.FloorChangeCallback
Changes Floor when the appropriate POI is clicked.
|
VgMyRouteCreator.RoutePoint
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
cMarkerObjects |
static java.lang.String |
cRoutingObjects |
protected java.util.HashMap<VgMyRouteCreator.RoutePoint,VgIRoutingNodeRefPtr> |
mRoutePoints |
Constructor and Description |
---|
VgMyRoutingHelper(VgMySurfaceView pSurfaceView,
VgMyTextureLoader pTextureLoader,
VgMyGeometryManager pGeometryManager,
VgIRouteCallbackRefPtr pRouteCallback,
VgMyLayerAndCameraHandler pLayerAndCameraHandler) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the object
|
protected double |
computeFloorHeightFromLayer(java.lang.String pLayerName)
Compute the floor height given a layer name
|
void |
computeRoute()
Computes a route based on the set end and start route
point.
|
protected void |
createAndAddRouteMarker(VgMyRouteCreator.RoutePoint pRoutePoint,
VgPosition pPosition)
creates and adds a route marker to the map
|
boolean |
createRouteObjects(VgIRouteConstRefPtr pRoute)
Creates the routes and its associated POIs
You can customize the route display as well as its starting&ending points.
|
VgIRouteRequestParameters |
editRoutingRequestParameters()
Returns a reference to the routing request parameters that computeRoute uses.
|
protected VgIRouteGeometryDescriptorVector |
get2DRouteDescriptors(VgIRouteConstRefPtr pRoute)
Helper that converts a route into 2D descriptors
|
protected java.lang.String |
getLayerNameForPosition(VgPosition pPosition) |
protected VgPosition |
getPositionOfPlace(java.lang.String pPlaceId)
Gets the position associated with a place.
|
protected VgAnimationRefPtr |
getRoutePointHighlightAnimationDescriptor() |
void |
hide()
Hides this Object.
|
protected boolean |
isPlaceRoutable(java.lang.String pPlaceId)
Checks whether a place is routable based on place Id.
|
boolean |
isRoutePointSet(VgMyRouteCreator.RoutePoint pPoint) |
boolean |
isVisible() |
void |
release()
This method should be called when the activity dies to notify that we
should release/unregister all VisioDevKit objects, and null out as much
references on other objects as possible.
|
void |
resetRoutePoint(VgMyRouteCreator.RoutePoint pPoint)
Resets the place ID associated with a point
|
void |
resetRoutingRequestParameters()
Resets the routing request parameters to their initial state.
|
void |
setAvoidStairs(boolean pDisabledFriendly)
Sets up the routing request parameters to include/exclude non disabled-friendly
attributes.
|
void |
setPoiCallback(java.lang.String pIdentifier,
VgIGeometryCallback pCallback)
Sets a callback for a specific POI identifier.
|
boolean |
setRoutePoint(VgMyRouteCreator.RoutePoint pPoint,
java.lang.String pPlaceID)
Sets a RoutePoint to a specific place.
|
boolean |
setRoutePoint(VgMyRouteCreator.RoutePoint pPoint,
VgPosition pPosition)
Sets a RoutePoint to a specific place.
|
void |
show()
Displays this Object.
|
public static final java.lang.String cRoutingObjects
public static final java.lang.String cMarkerObjects
protected java.util.HashMap<VgMyRouteCreator.RoutePoint,VgIRoutingNodeRefPtr> mRoutePoints
public VgMyRoutingHelper(VgMySurfaceView pSurfaceView, VgMyTextureLoader pTextureLoader, VgMyGeometryManager pGeometryManager, VgIRouteCallbackRefPtr pRouteCallback, VgMyLayerAndCameraHandler pLayerAndCameraHandler)
protected boolean isPlaceRoutable(java.lang.String pPlaceId)
pPlaceId
- The id of the place to check for routability.protected VgPosition getPositionOfPlace(java.lang.String pPlaceId)
pPlaceId
- The id of the place whose position is to be retrievedprotected java.lang.String getLayerNameForPosition(VgPosition pPosition)
protected void createAndAddRouteMarker(VgMyRouteCreator.RoutePoint pRoutePoint, VgPosition pPosition)
pRoutePoint
- Indicates the type of marker to be displayedpPosition
- The position of the marker in the map. The position's
altitude is used to determine which floor to add the marker to.protected VgAnimationRefPtr getRoutePointHighlightAnimationDescriptor()
protected VgIRouteGeometryDescriptorVector get2DRouteDescriptors(VgIRouteConstRefPtr pRoute)
pRoute
- Route to convertprotected double computeFloorHeightFromLayer(java.lang.String pLayerName)
pLayerName
- The layer name whose floor height is to be returnedpublic boolean setRoutePoint(VgMyRouteCreator.RoutePoint pPoint, java.lang.String pPlaceID)
VgMyRouteCreator
setRoutePoint
in interface VgMyRouteCreator
pPoint
- RoutePoint to setpPlaceID
- Place to associates with pPoint.public boolean setRoutePoint(VgMyRouteCreator.RoutePoint pPoint, VgPosition pPosition)
VgMyRouteCreator
setRoutePoint
in interface VgMyRouteCreator
pPoint
- RoutePoint to setpPosition
- Place to associates with pPoint.public void resetRoutePoint(VgMyRouteCreator.RoutePoint pPoint)
VgMyRouteCreator
resetRoutePoint
in interface VgMyRouteCreator
pPoint
- RoutePoint to reset.public boolean isRoutePointSet(VgMyRouteCreator.RoutePoint pPoint)
isRoutePointSet
in interface VgMyRouteCreator
pPoint
- RoutePoint to test.public void computeRoute()
computeRoute
in interface VgMyRouteCreator
public VgIRouteRequestParameters editRoutingRequestParameters()
VgMyRouteCreator
editRoutingRequestParameters
in interface VgMyRouteCreator
public void resetRoutingRequestParameters()
VgMyRouteCreator
resetRoutingRequestParameters
in interface VgMyRouteCreator
public void setAvoidStairs(boolean pDisabledFriendly)
VgMyRouteCreator
setAvoidStairs
in interface VgMyRouteCreator
pDisabledFriendly
- True if disabled friendly routing is wanted, false if notpublic boolean createRouteObjects(VgIRouteConstRefPtr pRoute)
createRouteObjects
in interface VgMyRouteDisplay
pRoute
- The object containing the route data to represent.public void clear()
VgMyRouteDisplay
clear
in interface VgMyRouteDisplay
public void show()
VgMyDisplayable
show
in interface VgMyDisplayable
public void hide()
VgMyDisplayable
hide
in interface VgMyDisplayable
public boolean isVisible()
isVisible
in interface VgMyDisplayable
public void setPoiCallback(java.lang.String pIdentifier, VgIGeometryCallback pCallback)
VgMyPoiConfigurationSetter
setPoiCallback
in interface VgMyPoiConfigurationSetter
public void release()
release
in interface VgMyRouteCreator
release
in interface VgMyRouteDisplay