|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectWebView
com.radiusnetworks.navigationkit.MapView
public class MapView
The MapView
displays a pre-configured map with full Navigation Kit
utilities automatically. It uses WebView
to display a map with location
awareness provided through detecting beacons that have been configured on
navigationkit.radiusnetworks.com.
The user location will be displayed using a blue dot that is placed upon the map. This dot's location on the map will correspond with the location of the closest beacon that has been detected. You must configure your beacons and place them into their respective positions to get an accurate representation of the map when navigating through the real-life version of it.
Below is an example of code to use this feature:
NavigationKitManager mNavigationKitManager = NavigationKitManager.getInstanceForApplication(this);
//setting up connection to Radius's built-in MapView class
MapView mMapView = new MapView(this);
//connecting MapView to UI
((FrameLayout)this.findViewById(R.id.webview_layout)).addView(mMapView);
mMapView.loadMap(mNavigationKitManager.findMap("V1"));
MapViewNotifier
Field Summary | |
---|---|
static boolean |
isAttachedToWindow
|
Constructor Summary | |
---|---|
MapView(Context c)
|
Method Summary | |
---|---|
void |
didUpdateMapConfig()
Invoked when maps and map configurations have been updated from the server. |
void |
didUpdateMapLocation(MapLocation location)
Invoked when a new map location is available. |
MapLocation |
getCurrentLocationMapCoordinate()
|
static boolean |
isWaitingForMapLoad()
|
void |
loadMap(MapConfig mapConfig)
Loads the given map into the view. |
protected void |
notifyTapped(double x,
double y)
|
void |
onAttachedToWindow()
|
void |
onDetachedFromWindow()
|
void |
onWindowFocusChanged(boolean hasWindowFocus)
|
void |
setMapViewNotifier(MapViewNotifier notifier)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean isAttachedToWindow
Constructor Detail |
---|
public MapView(Context c)
c
- Activity's Context (NOT Application Context)Method Detail |
---|
public void loadMap(MapConfig mapConfig)
mapConfig
- public void setMapViewNotifier(MapViewNotifier notifier)
public static boolean isWaitingForMapLoad()
public void onAttachedToWindow()
public void onDetachedFromWindow()
public void onWindowFocusChanged(boolean hasWindowFocus)
public void didUpdateMapLocation(MapLocation location)
NavigationKitLocationNotifier
didUpdateMapLocation
in interface NavigationKitLocationNotifier
location
- is a MapLocation object representing the current locationpublic void didUpdateMapConfig()
NavigationKitLocationNotifier
didUpdateMapConfig
in interface NavigationKitLocationNotifier
protected void notifyTapped(double x, double y)
public MapLocation getCurrentLocationMapCoordinate()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |