Skip to content

Class LocationView

PavelTychinin edited this page Oct 29, 2021 · 5 revisions

LocationView class is used for showing the map and its elements on the device screen

Public methods

Initializers

public LocationView(final Context context)
public LocationView(final Context context, final AttributeSet attrs)

Functions for initialization LocationView

Function getLocationViewController

public LocationViewController getLocationViewController()

Function returns view controller for communication with LocationView

Function setSublocation

public void setSublocation(int id)

Function sets the sublocation for current downloaded and set location.

Parameters
  • id — id of the sublocation.

Function showBeacons

public void showBeacons(boolean visibility)

Function is used for showing and hiding all the beacons on the map.

Parameters
  • visibility — visibility status of beacons.

Function showEddystones

public void showEddystones(boolean visibility)

Function is used for showing and hiding all the eddystones on the map.

Parameters
  • visibility — visibility status of eddystones.

Function showWifis

public void showWifis(boolean visibility)

Function is used for showing and hiding all the wifi elements on the map.

Parameters
  • visibility — visibility status of wifi elements.

Function showVenues

public void showVenues(boolean visibility)

Function is used for showing and hiding all the venues on the map.

Parameters
  • visibility — visibility status of venues.

Function setTargetPoint

public void setTargetPoint(Point screenPoint)

Function is used for setting the target point on the map for making the route.

Parameters
  • screenPoint — point on the map in screen coordinates.

Function getTouchInput

public TouchInput getTouchInput()

Function is used for getting TouchInput class element for working with gestures and touches.

Return value

TouchInput class element.

Function getObjectAt

public CircleMapObject getObjectAt(Point screenPoint)

Function is used for getting circle map object at screen point.

Parameters
  • screenPoint — point on the map in screen coordinates.
Return value

CircleMapObject class element.

Function createCircleMapObject

public CircleMapObject createCircleMapObject()

Function is used for creating circle map object and getting it.

Return value

CircleMapObject class element, which could be modified by the user.

Function addCircleMapObject

public void addCircleMapObject(CircleMapObject mapObject)

Function is used for adding circle map object to the map.

Parameters
  • mapObject — previously created circle map object.

Function setCircleMapObjectsVisibility

public void setCircleMapObjectsVisibility(List<CircleMapObject> mapObjects, boolean visibility)

Function is used for changing the visibility of circle map objects.

Parameters
  • mapObjects — list of circle map objects added to the map.
  • visibility — visibility status to be set.

Function createTextureMapObject

public TextureMapObject createTextureMapObject()

Function is used for creating texture map object and getting it.

Return value

TextureMapObject class element, which could be modified by the user.

Function addTextureMapObject

public void addTextureMapObject(TextureMapObject mapObject)

Function is used for adding texture map object to the map.

Parameters
  • mapObject — previously created texture map object.

Function setTextureMapObjectsVisibility

public void setTextureMapObjectsVisibility(List<TextureMapObject> mapObjects, boolean visibility)

Function is used for changing the visibility of texture map objects.

Parameters
  • mapObjects — list of texture map objects added to the map.
  • visibility — visibility status to be set.

Function createLineMapObject

public LineMapObject createLineMapObject()

Function is used for creating line map object and getting it.

Return value

LineMapObject class element, which could be modified by the user.

Function addLineMapObject

public void addLineMapObject(LineMapObject mapObject)

Function is used for adding line map object to the map.

Parameters
  • mapObject — previously created line map object.

Function setLineMapObjectsVisibility

public void setLineMapObjectsVisibility(List<LineMapObject> mapObjects, boolean visibility)

Function is used for changing the visibility of line map objects.

Parameters
  • mapObjects — list of line map objects added to the map.
  • visibility — visibility status to be set.

Function screenToMetricCoordinates

public Point screenToMetricCoordinates(Point screenPoint)

Function is used for converting screen coordinates to the metric coordinates.

Parameters
  • screenPoint — point on the map in screen coordinates.

Function setBackgroundColor

public void setBackgroundColor(float red, float green, float blue, float alpha)

Function is used for setting the background color of screen.

Parameters
  • red — red color in range 0..1.
  • green — green color in range 0..1.
  • blue — blue color in range 0..1.
  • alpha — alpha color in range 0..1.

Function setMaxScale

public void setMaxScale(float value)

Function is used for setting the maximum scale value.

Parameters
  • value — maximum scale value. Default value is 100.

Function setMinScale

public void setMinScale(float value)

Function is used for setting the minimum scale value.

Parameters
  • value — minimum scale value. Default value is 1.

Function setZoomScale

public void setZoomScale(float value)

Function is used for setting current scale value.

Parameters
  • value — current scale value. Number should be in the range of minimum and maximum scale values.

Function attachToPosition

public void attachToPosition(boolean value)

Function is used for attaching the screen movements to the user position.

Parameters
  • value — if value set to true, screen will be attached to the user position and will move regarding it.

Clone this wiki locally