public class VgMyBasicApplicationController extends java.lang.Object implements VgMyLayerAndCameraListener, VgMyLayerAndCameraHandler, VgMyRouteCreator, VgMyRouteDisplay, VgMyPoiConfigurationSetter, VgMyInstructionDisplay, VgMyInstructionUpdateListener, VgMyAnchoredDisplay, VgMyLocationListener, VgMySurfaceView.VgMySurfaceViewListener
VgMyRouteCreator.RoutePoint
Modifier and Type | Field and Description |
---|---|
protected VgI3DModule |
m3DModule |
protected Activity |
mActivity |
protected VgMyAnchoredDisplay |
mAnchoredDisplay |
protected java.util.LinkedList<VgMyInstructionDisplay> |
mInstructionsDisplays |
protected VgMyLayerAndCameraHandler |
mLayerAndCameraHandler |
protected java.util.LinkedList<VgMyLayerAndCameraListener> |
mLayerAndCameraListeners |
protected VgIMapModule |
mMapModule |
protected VgINavigationRefPtr |
mNavigation |
VgINavigationCallbackRefPtr |
mNavigationCallback |
protected VgMyNavigationCreator |
mNavigationCreator |
VgINavigationListenerRefPtr |
mNavigationListener |
protected java.util.LinkedList<VgMyNavigationListener> |
mNavigationListeners |
protected VgINavigationModule |
mNavigationModule |
protected VgIRouteRefPtr |
mRoute |
VgIRouteCallbackRefPtr |
mRouteCallback |
protected VgMyRouteCreator |
mRouteCreator |
protected VgMyRouteDisplay |
mRouteDisplay |
protected VgIRoutingModule |
mRoutingModule |
static java.lang.String |
mscConfigFileDir |
static java.lang.String |
mscPreferenceID |
static java.lang.String |
mscPreferencesFile |
protected VgMySurfaceView |
mSurfaceView |
protected VgIApplication |
mVgApplication |
protected VgIDatabase |
mVgDatabase |
protected VgIEngine |
mVgEngine |
Constructor and Description |
---|
VgMyBasicApplicationController(Activity pActivity,
VgMySurfaceView pSurfaceView) |
Modifier and Type | Method and Description |
---|---|
void |
addInstructionDisplay(VgMyInstructionDisplay pDisplay) |
void |
addLayerAndCameraListener(VgMyLayerAndCameraListener pListener) |
void |
addNavigationListener(VgMyNavigationListener pListener) |
void |
clear()
Clears the object
|
void |
clearInstructionDisplays() |
void |
clearRouteDisplay() |
void |
computeRoute()
Computes a route.
|
void |
createNavigation(VgINavigationRequestParameters pParameters) |
boolean |
createRouteObjects(VgIRouteConstRefPtr pRoute)
Creates the geometry objects to be added to the view to represent the route
|
VgIRouteRequestParameters |
editRoutingRequestParameters()
Returns a reference to the routing request parameters that computeRoute uses.
|
java.lang.String |
getFocusedLayerName()
Gets the focused layer's name.
|
protected VgIViewPoint |
getViewpointFromPosition(VgPosition pPos) |
void |
goToInstruction(int pInstructionIndex)
Below are the implemented interfaces
|
void |
gotoLayer(long pLayerIndex,
boolean pIsAnimated)
Focus a specific layer
|
void |
gotoLayer(java.lang.String pLayerName,
boolean pIsAnimated)
Focus a specific layer
|
void |
gotoLookAtPosition(VgPosition pPosition,
java.lang.String pLayerName,
boolean pIsAnimated)
Moves the camera so that it is focused on a given position.
|
void |
gotoViewpoint(VgIViewPoint pViewPoint,
java.lang.String pLayerName,
boolean pIsAnimated)
Moves the camera to a specific view point.
|
boolean |
has3DModule() |
boolean |
hasMapModule() |
boolean |
hasNavigationModule() |
boolean |
hasRoutingModule() |
void |
hide()
Hides this Object.
|
void |
hideAnchoredDisplay() |
void |
hideInstructionDisplays() |
void |
hideRouteDisplay() |
boolean |
isGlobalView() |
boolean |
isRoutePointSet(VgMyRouteCreator.RoutePoint pPoint) |
boolean |
isVisible() |
boolean |
isVisibleRouteDisplay() |
boolean |
isVisioDevKitValid() |
void |
layerChangedTo(VgMyLayerAndCameraHandler pSender,
java.lang.String pFloorFrom,
java.lang.String pFloorTo)
Notification that the layer focus did change.
|
void |
layerWillChangeFrom(VgMyLayerAndCameraHandler pSender,
java.lang.String pFloorFrom,
java.lang.String pFloorTo)
Notification that the layer focus is about to change
|
boolean |
loadConfiguration(java.lang.String pConfiguration,
long pSecretKey,
java.lang.String pLicenseURL,
long pDataset) |
void |
notifyAccuracyDidChange(java.lang.String pProvider,
double pAccuracy)
Called when the accuracy has changed.
|
void |
notifyContextDidChange(java.lang.String pProvider,
int pContext)
Called when the context has changed
|
void |
notifyFloorDidChange(java.lang.String pProvider,
java.lang.String pFloor)
Called when the floor has changed.
|
void |
notifyHeadingDidChange(java.lang.String pProvider,
double pHeading)
Called when the heading has changed.
|
void |
notifyLocationProviderDisabled(java.lang.String pProvider)
Called when the provider is disabled
|
void |
notifyLocationProviderEnabled(java.lang.String pProvider)
Called when the provider is enabled
|
void |
notifyPositionDidChange(java.lang.String pProvider,
VgPosition pPosition)
Called when the location has changed
|
void |
onSurfaceChanged(GL10 gl,
int pWidth,
int pHeight)
Called when the gl surface has changed.
|
void |
onSurfaceDestroyed()
Called when the gl surface has been destroyed.
|
void |
refreshParameters(long pWidth,
long pHeight)
Refreshes the inner parameters.
|
void |
reinitAppBlocks()
Reset the state of the app logic that was created during
the post restore phase.
|
void |
release()
This method should be called by the activity to notify the controller
that it 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.
|
protected void |
retrieveVisioDevKit() |
protected void |
retrieveVisioDevKitModules() |
void |
setAnchoredDisplay(VgMyAnchoredDisplay pBubbleView) |
void |
setAnchorPosition(java.lang.String pPlaceID,
VgPosition pPosition)
Sets the anchoring to a specific place.
|
void |
setAvoidStairs(boolean pDisabledFriendly)
Sets up the routing request parameters to include/exclude non disabled-friendly
attributes.
|
void |
setConfigurationFile(java.lang.String pConfigurationFile) |
void |
setLayerAndCameraHandler(VgMyLayerAndCameraHandler pHandler) |
void |
setLicenseUrl(java.lang.String pLicenseUrl) |
void |
setNavigationCreator(VgMyNavigationCreator pCreator) |
void |
setPoiCallback(java.lang.String pIdentifier,
VgIGeometryCallback pCallback)
Sets a callback for a specific POI identifier.
|
void |
setRouteCreator(VgMyRouteCreator pCreator) |
void |
setRouteDisplay(VgMyRouteDisplay pDisplay) |
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 |
setSecretCode(long pSecretCode) |
boolean |
setup() |
void |
show()
Displays this Object.
|
void |
showAnchoredDisplay() |
void |
showInstructionDisplays() |
void |
showRouteDisplay() |
void |
switchToDetailedView(boolean pIsAnimated)
Switches from the global to the detailed view.
|
void |
switchToGlobalView(boolean pIsAnimated)
Switches from the detailledView to the global view.
|
void |
updateWithInstruction(VgINavigationConstRefPtr pNavigation,
long pIndex)
Updates this Display with an instruction.
|
void |
viewDidChange(VgMyLayerAndCameraHandler pSender,
boolean pDoesChangeFromGlobalToDetailed)
Notification that the view has changed its 'mode' (global or detailed)
|
void |
viewWillChange(VgMyLayerAndCameraHandler pSender,
boolean pDoesChangeFromGlobalToDetailed)
Notification that the view will change its 'mode' (global or detailed)
|
public static final java.lang.String mscPreferenceID
public static final java.lang.String mscPreferencesFile
public static final java.lang.String mscConfigFileDir
protected Activity mActivity
protected VgMySurfaceView mSurfaceView
public VgIRouteCallbackRefPtr mRouteCallback
public VgINavigationCallbackRefPtr mNavigationCallback
public VgINavigationListenerRefPtr mNavigationListener
protected VgIApplication mVgApplication
protected VgIEngine mVgEngine
protected VgIDatabase mVgDatabase
protected VgIMapModule mMapModule
protected VgI3DModule m3DModule
protected VgIRoutingModule mRoutingModule
protected VgINavigationModule mNavigationModule
protected VgINavigationRefPtr mNavigation
protected VgIRouteRefPtr mRoute
protected VgMyLayerAndCameraHandler mLayerAndCameraHandler
protected VgMyRouteCreator mRouteCreator
protected VgMyRouteDisplay mRouteDisplay
protected VgMyAnchoredDisplay mAnchoredDisplay
protected VgMyNavigationCreator mNavigationCreator
protected java.util.LinkedList<VgMyLayerAndCameraListener> mLayerAndCameraListeners
protected java.util.LinkedList<VgMyInstructionDisplay> mInstructionsDisplays
protected java.util.LinkedList<VgMyNavigationListener> mNavigationListeners
public VgMyBasicApplicationController(Activity pActivity, VgMySurfaceView pSurfaceView)
public boolean loadConfiguration(java.lang.String pConfiguration, long pSecretKey, java.lang.String pLicenseURL, long pDataset)
public void reinitAppBlocks()
public void setLayerAndCameraHandler(VgMyLayerAndCameraHandler pHandler)
public void setRouteCreator(VgMyRouteCreator pCreator)
public void setRouteDisplay(VgMyRouteDisplay pDisplay)
public void setNavigationCreator(VgMyNavigationCreator pCreator)
public void addLayerAndCameraListener(VgMyLayerAndCameraListener pListener)
public void addInstructionDisplay(VgMyInstructionDisplay pDisplay)
public void setAnchoredDisplay(VgMyAnchoredDisplay pBubbleView)
public void addNavigationListener(VgMyNavigationListener pListener)
public boolean has3DModule()
public boolean hasMapModule()
public boolean hasRoutingModule()
public boolean hasNavigationModule()
public void setLicenseUrl(java.lang.String pLicenseUrl)
public void setSecretCode(long pSecretCode)
public void setConfigurationFile(java.lang.String pConfigurationFile)
protected void retrieveVisioDevKit()
protected void retrieveVisioDevKitModules()
public boolean isVisioDevKitValid()
protected VgIViewPoint getViewpointFromPosition(VgPosition pPos)
public void goToInstruction(int pInstructionIndex)
goToInstruction
in interface VgMyInstructionUpdateListener
pInstructionIndex
- The new instruction index to use as the current one.public boolean setup()
public void onSurfaceChanged(GL10 gl, int pWidth, int pHeight)
VgMySurfaceView.VgMySurfaceViewListener
onSurfaceChanged
in interface VgMySurfaceView.VgMySurfaceViewListener
public void onSurfaceDestroyed()
VgMySurfaceView.VgMySurfaceViewListener
onSurfaceDestroyed
in interface VgMySurfaceView.VgMySurfaceViewListener
public void layerWillChangeFrom(VgMyLayerAndCameraHandler pSender, java.lang.String pFloorFrom, java.lang.String pFloorTo)
VgMyLayerAndCameraListener
layerWillChangeFrom
in interface VgMyLayerAndCameraListener
pFloorFrom
- The layer which currently has focuspFloorTo
- The layer which will soon have the focuspublic void layerChangedTo(VgMyLayerAndCameraHandler pSender, java.lang.String pFloorFrom, java.lang.String pFloorTo)
VgMyLayerAndCameraListener
layerChangedTo
in interface VgMyLayerAndCameraListener
pFloorFrom
- The layer which previously had the focus.pFloorTo
- The layer which currently has the focus.public void viewWillChange(VgMyLayerAndCameraHandler pSender, boolean pDoesChangeFromGlobalToDetailed)
VgMyLayerAndCameraListener
viewWillChange
in interface VgMyLayerAndCameraListener
pDoesChangeFromGlobalToDetailed
- True if the view switch to global view,
False if it switches to the detailed view.public void viewDidChange(VgMyLayerAndCameraHandler pSender, boolean pDoesChangeFromGlobalToDetailed)
VgMyLayerAndCameraListener
viewDidChange
in interface VgMyLayerAndCameraListener
pDoesChangeFromGlobalToDetailed
- True if the view switch to global view,
False if it switches to the detailed view.public boolean isGlobalView()
isGlobalView
in interface VgMyLayerAndCameraHandler
public void switchToGlobalView(boolean pIsAnimated)
VgMyLayerAndCameraHandler
switchToGlobalView
in interface VgMyLayerAndCameraHandler
pIsAnimated
- If true then animates the transition, otherwise does not.public void switchToDetailedView(boolean pIsAnimated)
VgMyLayerAndCameraHandler
switchToDetailedView
in interface VgMyLayerAndCameraHandler
pIsAnimated
- If true then animates the transition, otherwise does not.public void gotoLayer(java.lang.String pLayerName, boolean pIsAnimated)
VgMyLayerAndCameraHandler
gotoLayer
in interface VgMyLayerAndCameraHandler
pLayerName
- Layer that will be focused.
keeps current mode.pIsAnimated
- If true then animates the transition, otherwise does not.public void gotoLayer(long pLayerIndex, boolean pIsAnimated)
VgMyLayerAndCameraHandler
gotoLayer
in interface VgMyLayerAndCameraHandler
pLayerIndex
- Layer index which is associated with the returned list given by VgLayerManager::getLayers().
keeps current mode.pIsAnimated
- If true then animates the transition, otherwise does not.public java.lang.String getFocusedLayerName()
VgMyLayerAndCameraHandler
getFocusedLayerName
in interface VgMyLayerAndCameraHandler
public void gotoViewpoint(VgIViewPoint pViewPoint, java.lang.String pLayerName, boolean pIsAnimated)
VgMyLayerAndCameraHandler
gotoViewpoint
in interface VgMyLayerAndCameraHandler
pViewPoint
- The view point to associate with the camerapLayerName
- The layer which should be given the focus.pIsAnimated
- If true then animates the transition, otherwise does not.public void gotoLookAtPosition(VgPosition pPosition, java.lang.String pLayerName, boolean pIsAnimated)
VgMyLayerAndCameraHandler
gotoLookAtPosition
in interface VgMyLayerAndCameraHandler
pPosition
- The position to focus on.pLayerName
- The name of the layer associated with the position.pIsAnimated
- If true then animates the transition, otherwise does not.public void refreshParameters(long pWidth, long pHeight)
VgMyLayerAndCameraHandler
refreshParameters
in interface VgMyLayerAndCameraHandler
public 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()
VgMyRouteCreator
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)
VgMyRouteDisplay
createRouteObjects
in interface VgMyRouteDisplay
pRoute
- The object containing the route data to represent.public void clearRouteDisplay()
public boolean isVisibleRouteDisplay()
public void showRouteDisplay()
public void hideRouteDisplay()
public void setPoiCallback(java.lang.String pIdentifier, VgIGeometryCallback pCallback)
VgMyPoiConfigurationSetter
setPoiCallback
in interface VgMyPoiConfigurationSetter
public void createNavigation(VgINavigationRequestParameters pParameters)
public void setAnchorPosition(java.lang.String pPlaceID, VgPosition pPosition)
VgMyAnchoredDisplay
setAnchorPosition
in interface VgMyAnchoredDisplay
pPlaceID
- The place where to set the anchoring.public void showAnchoredDisplay()
public void hideAnchoredDisplay()
public void updateWithInstruction(VgINavigationConstRefPtr pNavigation, long pIndex)
VgMyInstructionDisplay
updateWithInstruction
in interface VgMyInstructionDisplay
pNavigation
- The navigation object used.pIndex
- The instruction index to use.public void showInstructionDisplays()
public void hideInstructionDisplays()
public void clearInstructionDisplays()
public void clear()
VgMyRouteDisplay
clear
in interface VgMyInstructionDisplay
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 notifyPositionDidChange(java.lang.String pProvider, VgPosition pPosition)
VgMyLocationListener
notifyPositionDidChange
in interface VgMyLocationListener
pProvider
- The location provider responsible for sending the notificationpPosition
- The new positionpublic void notifyFloorDidChange(java.lang.String pProvider, java.lang.String pFloor)
VgMyLocationListener
notifyFloorDidChange
in interface VgMyLocationListener
pProvider
- The location provider responsible for sending the notification.pFloor
- The new floorpublic void notifyAccuracyDidChange(java.lang.String pProvider, double pAccuracy)
VgMyLocationListener
notifyAccuracyDidChange
in interface VgMyLocationListener
pProvider
- The location provider responsible for sending the notification.pAccuracy
- The new accuracypublic void notifyContextDidChange(java.lang.String pProvider, int pContext)
VgMyLocationListener
notifyContextDidChange
in interface VgMyLocationListener
pProvider
- The location provider responsible for sending the notification.pContext
- The new contextpublic void notifyHeadingDidChange(java.lang.String pProvider, double pHeading)
VgMyLocationListener
notifyHeadingDidChange
in interface VgMyLocationListener
pProvider
- The location provider responsible for sending the notification.pHeading
- The new headingpublic void notifyLocationProviderEnabled(java.lang.String pProvider)
VgMyLocationListener
notifyLocationProviderEnabled
in interface VgMyLocationListener
pProvider
- The location provider responsible for sending the notification.public void notifyLocationProviderDisabled(java.lang.String pProvider)
VgMyLocationListener
notifyLocationProviderDisabled
in interface VgMyLocationListener
pProvider
- The location provider responsible for sending the notification.public void release()
release
in interface VgMyAnchoredDisplay
release
in interface VgMyInstructionDisplay
release
in interface VgMyLayerAndCameraHandler
release
in interface VgMyRouteCreator
release
in interface VgMyRouteDisplay