com.dopanic.panicarkit.lib
Class PARController

java.lang.Object
  extended by com.dopanic.panicarkit.lib.PARController
All Implemented Interfaces:
PSKEventListener

public class PARController
extends java.lang.Object
implements PSKEventListener

Handles management of POIs


Field Summary
static float CLIP_POIS_FARER_THAN
          clip POIs farther away than 10.000.000 meters = 10.000 km
static float CLIP_POIS_NEARER_THAN
          clip POIs closer than 5 meters
static PARDataCollector dataCollector
           
static boolean DEBUG
          Set this to true to enable debug mode
 
Method Summary
 void addPoi(PARPoi poi)
          Adds a PARPoi object to the controller
 void addPois(java.util.ArrayList<PARPoi> anArray)
          Adds an ArrayList of PARPois to the controller Objects need to have locations assigned, markers without will be omitted!
 void clearObjects()
          Remove all objects from the controller
static Context getContext()
          Get context
static PARController getInstance()
          Get PARController instance
static java.util.ArrayList<PARPoi> getPois()
          Get all pois added to the controller
 boolean hasValidApiKey()
          Check for valid API key
 void init(Context ctx, java.lang.String apiKey)
          Initialize PARController (replaces standard constructor)
 int numberOfObjects()
           
 void onDeviceOrientationChanged(PSKDeviceOrientation newOrientation)
           
 void onLocationChangedEvent(Location location)
           
 void removeObject(int index)
          Remove PARPoi at specific index
 void removeObject(PARPoi poi)
          Remove a PARPoi object
 void setApiKey(java.lang.String apiKey)
          Sets the api key to disable watermark
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static boolean DEBUG
Set this to true to enable debug mode


CLIP_POIS_NEARER_THAN

public static float CLIP_POIS_NEARER_THAN
clip POIs closer than 5 meters


CLIP_POIS_FARER_THAN

public static float CLIP_POIS_FARER_THAN
clip POIs farther away than 10.000.000 meters = 10.000 km


dataCollector

public static PARDataCollector dataCollector
Method Detail

getContext

public static Context getContext()
Get context

Returns:
the app _context (used to create ui elements)

getInstance

public static PARController getInstance()
Get PARController instance

Returns:
the shared PARController

getPois

public static java.util.ArrayList<PARPoi> getPois()
Get all pois added to the controller

Returns:
ArrayList collection of PARPois

init

public void init(Context ctx,
                 java.lang.String apiKey)
Initialize PARController (replaces standard constructor)

Parameters:
ctx - Application context
apiKey - API Key

setApiKey

public void setApiKey(java.lang.String apiKey)
Sets the api key to disable watermark

Parameters:
apiKey - The API key

hasValidApiKey

public boolean hasValidApiKey()
Check for valid API key

Returns:
true, if valid api key is set

addPoi

public void addPoi(PARPoi poi)
Adds a PARPoi object to the controller

Parameters:
poi - A point of interest

addPois

public void addPois(java.util.ArrayList<PARPoi> anArray)
Adds an ArrayList of PARPois to the controller Objects need to have locations assigned, markers without will be omitted!

Parameters:
anArray - The ArrayList of PARPois to be added

removeObject

public void removeObject(PARPoi poi)
Remove a PARPoi object

Parameters:
poi - The PARPoi object to remove

clearObjects

public void clearObjects()
Remove all objects from the controller


removeObject

public void removeObject(int index)
Remove PARPoi at specific index

Parameters:
index -

numberOfObjects

public int numberOfObjects()
Returns:
the number of objects currently added to the Controller

onLocationChangedEvent

public void onLocationChangedEvent(Location location)
Specified by:
onLocationChangedEvent in interface PSKEventListener

onDeviceOrientationChanged

public void onDeviceOrientationChanged(PSKDeviceOrientation newOrientation)
Specified by:
onDeviceOrientationChanged in interface PSKEventListener



Copyright © 2014 doPanic GmbH. All rights reserved.