EegeoMap

Package: com.eegeo.mapapi

Main class representing a map. This class is the entry point for methods which change the camera, manage markers, and handle indoor maps. An instance of this class can be obtained through the OnMapReadyCallback passed to the getMapAsync method on the MapView object. Public methods on this class should be called from the Android UI thread.

Methods

void moveCamera(CameraUpdate update)

Moves the camera change from its current position to a new position.

Type argument Description
CameraUpdate update Specifies the new position, either by specifying the new camera position, or by describing the desired display area.

void animateCamera(CameraUpdate update, int durationMs)

Animates the camera change from its current position to a new position.

Type argument Description
CameraUpdate update Specifies the new position, either by specifying the new camera position, or by describing the desired display area.
int durationMs Length of time for the transition, in ms.

void animateCamera(CameraUpdate update, CameraAnimationOptions animationOptions)

Animates the camera change from its current position to a new position.

Type argument Description
CameraUpdate update Specifies the new position, either by specifying the new camera position, or by describing the desired display area.
CameraAnimationOptions animationOptions The animation options for the camera transition.

Projection getProjection()

Returns the current projection.

Returns: The current projection.

void stopAnimation()

Stops any running camera animation.

void addOnCameraMoveListener(EegeoMap.OnCameraMoveListener listener)

Registers a listener for camera move events.

Type argument Description
EegeoMap.OnCameraMoveListener listener The listener to be notified.

void removeOnCameraMoveListener(EegeoMap.OnCameraMoveListener listener)

Unregisters a listener for camera move events.

Type argument Description
EegeoMap.OnCameraMoveListener listener The listener to be removed.

void addOnMapClickListener(EegeoMap.OnMapClickListener listener)

Registers a listener for user map point selection events.

Type argument Description
EegeoMap.OnMapClickListener listener The listener to be notified.

void removeOnMapClickListener(EegeoMap.OnMapClickListener listener)

Unregisters a listener for user map point selection events.

Type argument Description
EegeoMap.OnMapClickListener listener The listener to be removed.

CameraPosition getCameraPosition()

Gets the current camera position.

Returns: The current camera position.

void setCameraPosition(CameraPosition cameraPosition)

Sets the camera to the specified CameraPosition. No transition or animation is applied.

Type argument Description
CameraPosition cameraPosition The new camera position.

void setIndoorCameraRestriction(Boolean indoorCameraRestriction)

Enable or Disable the camera restriction when viewing Indoor Maps. When enabled, the camera is unable to move outside the bounds of the Indoor Map.

Type argument Description
Boolean indoorCameraRestriction Whether the restriction is enabled or disabled.

void setCameraScreenSpaceOffset(Point point)

Set the camera to focus on a particular screen coordinate, so it will rotate and zoom around this point on screen.

Type argument Description
Point point The screen space point, in units of pixels with the origin at the top left corner of the screen.

void disableCameraScreenSpaceOffset()

Disable any previously set screen space offset set by setCameraScreenSpaceOffset amd resume the default behavior.

void onTapped(Point point)

Called from the SDK when the screen has been tapped.

Type argument Description
Point point Screen coordinates of the tapped point.

void expandIndoor()

Show the expanded indoor map view.

void collapseIndoor()

Show the collapsed indoor map view.

IndoorMap getActiveIndoorMap()

Gets the active indoor map.

Returns: The active indoor map, or null if no indoor map is active.

int getCurrentFloorIndex()

Gets the active floor of the current indoor map.

Returns: The index of the active floor of the current indoor map, or -1 if no indoor map is active.

void addOnIndoorEnteredListener(OnIndoorEnteredListener listener)

Registers a listener for indoor map entrance events.

Type argument Description
OnIndoorEnteredListener listener The listener to be notified when the user taps an indoor entrance marker.

void removeOnIndoorEnteredListener(OnIndoorEnteredListener listener)

Unregisters a listener for indoor map entrance events.

Type argument Description
OnIndoorEnteredListener listener The listener to be removed

void addOnIndoorExitedListener(OnIndoorExitedListener listener)

Registers a listener for indoor map exit events.

Type argument Description
OnIndoorExitedListener listener The listener to be notified when the user exits an indoor map.

void removeOnIndoorExitedListener(OnIndoorExitedListener listener)

Unregisters a listener for indoor map exit events.

Type argument Description
OnIndoorExitedListener listener The listener to be removed.

void addOnIndoorEnterFailedListener(OnIndoorEnterFailedListener listener)

Registers a listener for indoor map enter failed events.

Type argument Description
OnIndoorEnterFailedListener listener The listener to be notified when the user fails to enter an indoor map.

void removeOnIndoorEnterFailedListener(OnIndoorEnterFailedListener listener)

Unregisters a listener for indoor map failed events.

Type argument Description
OnIndoorEnterFailedListener listener The listener to be removed.

void addOnIndoorMapLoadedListener(OnIndoorMapLoadedListener listener)

Registers a listener for indoor map loaded events.

Type argument Description
OnIndoorMapLoadedListener listener The listener to be notified when an indoor map is loaded.

void removeOnIndoorMapLoadedListener(OnIndoorMapLoadedListener listener)

Unregisters a listener for indoor map unloaded events.

Type argument Description
OnIndoorMapLoadedListener listener The listener to be removed.

void addOnIndoorMapUnloadedListener(OnIndoorMapUnloadedListener listener)

Registers a listener for indoor map unloaded events.

Type argument Description
OnIndoorMapUnloadedListener listener The listener to be notified when an indoor map is unloaded.

void removeOnIndoorMapUnloadedListener(OnIndoorMapUnloadedListener listener)

Unregisters a listener for indoor map unloaded events.

Type argument Description
OnIndoorMapUnloadedListener listener The listener to be removed.

void onExitIndoorClicked()

Exits the current indoor map.

void exitIndoorMap()

Exits the current indoor map.

boolean enterIndoorMap(String indoorMapId)

Enters the specified indoor map.

Type argument Description
String indoorMapId The id of the indoor map to enter

void setIndoorFloor(int selectedFloor)

Sets the current floor shown in an indoor map.

Type argument Description
int selectedFloor The index of the floor to be shown, relative to the array returned by IndoorMap.getFloorIds()

void moveIndoorUp()

Moves up one floor in the current indoor map.

void moveIndoorUp(int numberOfFloors)

Moves up a number of floors in the current indoor map.

Type argument Description
int numberOfFloors The number of floors to move up.

void moveIndoorDown()

Moves down one floor in the current indoor map.

void moveIndoorDown(int numberOfFloors)

Moves down a number of floors in the current indoor map.

Type argument Description
int numberOfFloors The number of floors to move down

void setIndoorFloorInterpolation(float dragParameter)

Sets the interpolation value used in the expanded indoor view.

Type argument Description
float dragParameter The float value, in the range 0 .. number of floors.

void setExitIndoorWhenTooFarAway(Boolean exitWhenFarAway)

void addOnFloorChangedListener(OnFloorChangedListener listener)

Registers a listener for indoor map floor change events.

Type argument Description
OnFloorChangedListener listener The listener to be notified.

void removeOnFloorChangedListener(OnFloorChangedListener listener)

Unregisters a listener for indoor map floor change events.

Type argument Description
OnFloorChangedListener listener The listener to be removed.

Marker addMarker(MarkerOptions markerOptions)

Create a marker and add it to the map.

Returns: The Marker that was added

Type argument Description
MarkerOptions markerOptions Creation parameters for the marker

void removeMarker(Marker marker)

Remove a marker from the map and destroy it.

Type argument Description
Marker marker The Marker to remove.

Positioner addPositioner(PositionerOptions positionerOptions)

Create a positioner and add it to the map.

Returns: The Positioner that was added

Type argument Description
PositionerOptions positionerOptions Creation parameters for the positioner

void removePositioner(Positioner positioner)

Remove a positioner from the map and destroy it.

Type argument Description
Positioner positioner The Positioner to remove.

Polygon addPolygon(PolygonOptions polygonOptions)

Create a polygon and add it to the map.

Returns: The Polygon that was added

Type argument Description
PolygonOptions polygonOptions Creation parameters for the marker

void removePolygon(Polygon polygon)

Remove a polygon from the map and destroy it.

Type argument Description
Polygon polygon The Polygon to remove.

Polyline addPolyline(PolylineOptions polylineOptions)

Create a polyline and add it to the map.

Returns: The Polyline that was added

Type argument Description
PolylineOptions polylineOptions Creation parameters for the polyline

void removePolyline(Polyline polyline)

Remove a polyline from the map and destroy it.

Type argument Description
Polyline polyline The Polyline to remove.

Heatmap addHeatmap(HeatmapOptions heatmapOptions)

Create a heatmap and add it to the map.

Returns: The Heatmap that was added

Type argument Description
HeatmapOptions heatmapOptions Creation parameters for the marker

void removeHeatmap(Heatmap heatmap)

Remove a heatmap from the map and destroy it.

Type argument Description
Heatmap heatmap The Heatmap to remove.

BuildingHighlight addBuildingHighlight(BuildingHighlightOptions buildingHighlightOptions)

Create a building highlight and add it to the map.

Returns: The BuildingHighlight that was added

Type argument Description
BuildingHighlightOptions buildingHighlightOptions Creation parameters for the building highlight

void removeBuildingHighlight(BuildingHighlight buildingHighlight)

Remove a BuildingHighlight from the map and destroy it.

Type argument Description
BuildingHighlight buildingHighlight The BuildingHighlight to remove.

Prop addProp(PropOptions propOptions)

Create a prop and add it to the map.

Returns: The Prop that was added

Type argument Description
PropOptions propOptions Creation parameters for the prop

void removeProp(Prop prop)

Remove a prop from the map and destroy it.

Type argument Description
Prop prop The Prop to remove.

Promise<PickResult> pickFeatureAtScreenPoint(Point point)

Attempts to find a map feature at the given screen point. A ray is constructed from the camera location and passing through the screen point. The first intersection of the ray with any of the currently streamed map features is found, if any. See PickResult for details of information returned.

Returns: A promise to provide information about the map feature intersected with, if any.

The value of the promise can be accessed through an object implementing the Ready interface, for example:

 map.pickFeatureAtScreenPoint(point)
           .then(new Ready<PickResult>() {
               public void ready(PickResult pickResult) {
                   // use value of pickResult here
               }
           }
 );
 
Type argument Description
Point point A screen space point, in units of pixels with the origin at the top left corner of the screen.

Promise<PickResult> pickFeatureAtLatLng(LatLng latLng)

Attempts to find a map feature at the given LatLng location. See PickResult for details of information returned.

Returns: A promise to provide information about the map feature intersected with, if any.

The value of the promise can be accessed through an object implementing the Ready interface, for example:

 map.pickFeatureAtLatLng(point)
           .then(new Ready<PickResult>() {
               public void ready(PickResult pickResult) {
                   // use value of pickResult here
               }
           }
 );
 
Type argument Description
LatLng latLng A LatLng coordinate.

BlueSphere getBlueSphere()

Gets the BlueSphere

Returns: The BlueSphere.

void setMapCollapsed(boolean isCollapsed)

Sets whether the map view should display with vertical scaling applied so that terrain and other map features appear flattened.

boolean isMapCollapsed()

void setIndoorEntityHighlights(String indoorMapId, Collection<String> indoorEntityIds, int highlightColorARGB)

Sets highlights on a list of indoor map entities to the specified ARGB color.

Type argument Description
String indoorMapId ID for the indoor map the entities are in.
Collection<String> indoorEntityIds List of indoor map entities to highlight.
int highlightColorARGB ARGB color for the highlight

void setIndoorEntityHighlights(String indoorMapId, Collection<String> indoorEntityIds, int highlightColorARGB, float highlightBorderThickness)

Sets highlights on a list of indoor map entities to the specified ARGB color and border thickness. Note: Border thickness only applies to area highlights.

Type argument Description
String indoorMapId ID for the indoor map the entities are in.
Collection<String> indoorEntityIds List of indoor map entities to highlight.
int highlightColorARGB ARGB color for the highlight
float highlightBorderThickness A value between 0.0f and 1.0f that describes how thick the border should be. Defaults to 0.5f.

void clearIndoorEntityHighlights(String indoorMapId, Collection<String> indoorEntityIds)

Clears the highlights from a list of indoor map entities.

void clearAllIndoorEntityHighlights()

Clears all indoor entity highlights.

IndoorMapEntityInformation addIndoorMapEntityInformation(String indoorMapId, OnIndoorMapEntityInformationChangedListener indoorMapEntityInformationChangedListener)

Adds an IndoorMapEntityInformation object, that will become populated with the ids of any indoor map entities belonging to the specified indoor map as map tiles stream in.

Returns: The IndoorMapEntityInformation instance.

Type argument Description
String indoorMapId The id of the indoor map to obtain entity information for.
OnIndoorMapEntityInformationChangedListener indoorMapEntityInformationChangedListener A listener object to obtain notification when the IndoorMapEntityInformation has been updated with indoor map entity ids.

void removeIndoorMapEntityInformation(IndoorMapEntityInformation indoorMapEntityInformation)

Remove an IndoorMapEntityInformation object, previously added via addIndoorMapEntityInformation.

Type argument Description
IndoorMapEntityInformation indoorMapEntityInformation The IndoorMapEntityInformation instance to remove.

IndoorMapFloorOutlineInformation addIndoorMapFloorOutlineInformation(String indoorMapId, int indoorMapFloorId, OnIndoorMapFloorOutlineInformationLoadedListener indoorMapFloorOutlineInformationLoadedListener)

Adds an IndoorMapFloorOutlineInformation object, that will become populated with the outline of the specified indoor map floor as map tiles stream in.

Returns: The IndoorMapFloorOutlineInformation instance.

Type argument Description
String indoorMapId The id of the indoor map.
int indoorMapFloorId The id of the indoor map floor to obtain outline information for.
OnIndoorMapFloorOutlineInformationLoadedListener indoorMapFloorOutlineInformationLoadedListener A listener object to obtain notification when the IndoorMapFloorOutlineInformation has been updated with outline.

void removeIndoorMapFloorOutlineInformation(IndoorMapFloorOutlineInformation indoorMapFloorOutlineInformation)

Remove an IndoorMapFloorOutlineInformation object, previously added via addIndoorMapFloorOutlineInformation.

Type argument Description
IndoorMapFloorOutlineInformation indoorMapFloorOutlineInformation The IndoorMapFloorOutlineInformation instance to remove.

PoiService createPoiService()

Creates and returns a PoiService for this map.

Returns: A new PoiService object.

TagService createTagService()

Creates and returns a TagService for this map

Returns: A new TagService object.

MapsceneService createMapsceneService()

Creates and returns a MapsceneService for this map.

Returns: A new MapsceneService object.

RoutingService createRoutingService()

Creates and returns a RoutingService for this map.

Returns: A new RoutingService object.

void addMarkerClickListener(OnMarkerClickListener listener)

Register a listener to an event raised when a marker is tapped by the user.

Type argument Description
OnMarkerClickListener listener the listener to add

void removeMarkerClickListener(OnMarkerClickListener listener)

Unregister a listener to an event raised when a marker is tapped by the user.

Type argument Description
OnMarkerClickListener listener the listener to remove

void addPositionerChangedListener(OnPositionerChangedListener listener)

Register a listener to an event raised when a Positioner object has changed position.

Type argument Description
OnPositionerChangedListener listener the listener to add

void removePositionerChangedListener(OnPositionerChangedListener listener)

Unregister a listener to an event raised when a Positioner object has changed position.

Type argument Description
OnPositionerChangedListener listener the listener to remove

void addOnIndoorEntityPickedListener(OnIndoorEntityPickedListener listener)

Register a listener to an event raised when one or more indoor map entities are clicked or tapped by the user.

Type argument Description
OnIndoorEntityPickedListener listener the listener to add

void removeOnIndoorEntityPickedListener(OnIndoorEntityPickedListener listener)

Unregister a listener to an event raised when one or more indoor map entities are clicked or tapped by the user.

Type argument Description
OnIndoorEntityPickedListener listener the listener to remove

PrecacheOperation precache(LatLng center, double radius, OnPrecacheOperationCompletedListener callback)

Begin an operation to precache a spherical area of the map. This allows that area to load faster in future.

Returns: an object with a cancel() method to allow you to cancel the precache operation.

Type argument Description
LatLng center The center of the area to precache.
double radius The radius (in meters) of the area to precache.
OnPrecacheOperationCompletedListener callback The function to call when the precache operation completes. The function will be passed a boolean indicating whether the precache completed successfully.

double getMaximumPrecacheRadius()

Gets the maximum radius value that can be passed to precache(center, radius, callback)

Returns: the maxium radius that may be passed to precache, in meters

void addInitialStreamingCompleteListener(OnInitialStreamingCompleteListener listener)

Registers a listener to an event raised when the initial map scene has completed streaming all resources

Type argument Description
OnInitialStreamingCompleteListener listener The listener to be notified.

void removeInitialStreamingCompleteListener(OnInitialStreamingCompleteListener listener)

Unregisters a listener of the initial streaming complete event

Type argument Description
OnInitialStreamingCompleteListener listener The listener to be removed.

Promise<PointOnRoute> getPointOnRoute(LatLng point, Route route, PointOnRouteOptions pointOnRouteOptions)

Retrieve information about the closest point on a Route to a given input point.

Type argument Description
LatLng point The input point to find the closest point on the Route with.
Route route The Route that should be tested against.
PointOnRouteOptions pointOnRouteOptions Additional options for the Route; e.g, Indoor Map Id.

Promise<PointOnPath> getPointOnPath(LatLng point, List<LatLng> path)

Retrieve information about the closest point on a Path to a given input point.

Type argument Description
LatLng point The input point to find the closest point on the Path with.
List<LatLng> path The Path that should be tested against.

void setLabelsEnabled(boolean enabled)

Make labels visible or invisible.

Type argument Description
boolean enabled Whether labels should be visible.

class EegeoMap.OnCameraMoveListener

Interface for objects which receive notifications of changes to the camera.

Methods

void onCameraMove()

class EegeoMap.OnMapClickListener

Interface for objects which receive notifications when the user taps on the map.

Methods

void onMapClick(LatLngAlt point)

class EegeoMap.AllowApiAccess

v0.0.1467
Overview Introduction
Picking PickResult
Widgets (Optional) BlueSphere
Tag Service (Optional) TagService OnTagsLoadCompletedListener
RouteView Widget (Optional) RouteView RouteViewOptions