![]() |
Online Maps
v3
|
Controls map using Location Service (GPS and compass). More...
Public Member Functions | |
void | GetLocation (out float longitude, out float latitude) |
Returns the current GPS location or emulator location. More... | |
OnlineMapsSavableItem[] | GetSavableItems () |
Returns an array of items to save More... | |
abstract bool | IsLocationServiceRunning () |
Checks that the Location Service is running. More... | |
abstract void | StopLocationService () |
Stops Location Service More... | |
abstract bool | TryStartLocationService () |
Try to start Location Service. More... | |
void | UpdatePosition () |
Sets map position using GPS coordinates. More... | |
abstract void | UpdateSpeed () |
Updates the speed data. More... | |
Public Attributes | |
Action< float > | OnCompassChanged |
This event is called when the user rotates the device More... | |
OnGetLocationDelegate | OnGetLocation |
This event allows you to intercept receiving a GPS location More... | |
Action | OnFindLocationByIPComplete |
This event is called when the IP location are found More... | |
Action< Vector2 > | OnLocationChanged |
This event is called when changed your GPS location More... | |
Action | OnLocationInited |
This event is called when the GPS is initialized (the first value is received) or location by IP is found More... | |
Action | OnPositionRestored |
This event called after map position restored when timeout "Restore After" expires More... | |
bool | autoStopUpdateOnInput = true |
Update stop position when user input More... | |
float | compassThreshold = 8 |
Threshold of compass More... | |
bool | createMarkerInUserPosition = false |
Specifies the need to create a marker that indicates the current GPS coordinates More... | |
bool | disableEmulatorInPublish = true |
Indicates whether to disable the emulator when used on the device More... | |
float | emulatorCompass |
Emulated compass trueHeading. Do not use this field. Use OnlineMapsLocationService.trueHeading instead. More... | |
Vector2 | emulatorPosition |
Emulated GPS position. Do not use this field. Use OnlineMapsLocationService.position instead. More... | |
bool | findLocationByIP = false |
Specifies whether to search for a location by IP More... | |
bool | lerpCompassValue = true |
Smooth rotation by compass. This helps to bypass the jitter. More... | |
float | markerScale = 1 |
Scale of the marker More... | |
string | markerTooltip |
Tooltip of the marker More... | |
OnlineMapsLocationServiceMarkerType | markerType = OnlineMapsLocationServiceMarkerType.twoD |
Type of the marker. More... | |
OnlineMapsAlign | marker2DAlign = OnlineMapsAlign.Center |
Align of the 2D marker More... | |
Texture2D | marker2DTexture |
Texture of 2D marker More... | |
GameObject | marker3DPrefab |
Prefab of 3D marker. More... | |
OnlineMapsMarker3D.SizeType | marker3DSizeType = OnlineMapsMarker3D.SizeType.scene |
Marker size type. More... | |
int | maxPositionCount = 3 |
The maximum number of stored positions. It is used to calculate the speed. More... | |
Vector2 | position = Vector2.zero |
Current GPS coordinates. Important: position not available Start, because GPS is not already initialized. Use OnLocationInited event, to determine the initialization of GPS. More... | |
int | restoreAfter = 10 |
Use the GPS coordinates after seconds of inactivity. More... | |
bool | rotateCameraByCompass = false |
Rotates the camera through a compass. Requires OnlineMapsCameraOrbit component. More... | |
float | trueHeading = 0 |
The heading in degrees relative to the geographic North Pole. Important: position not available Start, because compass is not already initialized. Use OnCompassChanged event, to determine the initialization of compass. More... | |
bool | updateEmulatorPositionByMarker = false |
Specifies the need to update the position of the emulator by marker position. More... | |
bool | updatePosition = true |
Specifies whether the script will automatically update the location More... | |
bool | useCompassForMarker = false |
Specifies the need for marker rotation More... | |
bool | useGPSEmulator = false |
Specifies GPS emulator usage. Works only in Unity Editor. More... | |
Protected Member Functions | |
abstract void | GetLocationFromSensor (out float longitude, out float latitude) |
Returns the current GPS location from sensor. More... | |
Properties | |
static OnlineMapsLocationServiceBase | baseInstance [get] |
Instance of LocationService base. More... | |
static OnlineMapsMarkerBase | marker [get, set] |
Instance of marker. More... | |
bool | allowUpdatePosition [get, set] |
Is it allowed to update the position. More... | |
float | speed [get] |
Speed km/h. Note: in Unity Editor will always be zero. More... | |
Controls map using Location Service (GPS and compass).
void OnlineMapsLocationServiceBase.GetLocation | ( | out float | longitude, |
out float | latitude | ||
) |
Returns the current GPS location or emulator location.
longitude | Longitude |
latitude | Latitude |
|
protectedpure virtual |
Returns the current GPS location from sensor.
longitude | Longitude |
latitude | Latitude |
OnlineMapsSavableItem [] OnlineMapsLocationServiceBase.GetSavableItems | ( | ) |
Returns an array of items to save
Implements IOnlineMapsSavableComponent.
|
pure virtual |
Checks that the Location Service is running.
|
pure virtual |
Stops Location Service
|
pure virtual |
Try to start Location Service.
void OnlineMapsLocationServiceBase.UpdatePosition | ( | ) |
Sets map position using GPS coordinates.
|
pure virtual |
Updates the speed data.
bool OnlineMapsLocationServiceBase.autoStopUpdateOnInput = true |
Update stop position when user input
float OnlineMapsLocationServiceBase.compassThreshold = 8 |
Threshold of compass
bool OnlineMapsLocationServiceBase.createMarkerInUserPosition = false |
Specifies the need to create a marker that indicates the current GPS coordinates
bool OnlineMapsLocationServiceBase.disableEmulatorInPublish = true |
Indicates whether to disable the emulator when used on the device
float OnlineMapsLocationServiceBase.emulatorCompass |
Emulated compass trueHeading. Do not use this field. Use OnlineMapsLocationService.trueHeading instead.
Vector2 OnlineMapsLocationServiceBase.emulatorPosition |
Emulated GPS position. Do not use this field. Use OnlineMapsLocationService.position instead.
bool OnlineMapsLocationServiceBase.findLocationByIP = false |
Specifies whether to search for a location by IP
bool OnlineMapsLocationServiceBase.lerpCompassValue = true |
Smooth rotation by compass. This helps to bypass the jitter.
OnlineMapsAlign OnlineMapsLocationServiceBase.marker2DAlign = OnlineMapsAlign.Center |
Align of the 2D marker
Texture2D OnlineMapsLocationServiceBase.marker2DTexture |
Texture of 2D marker
GameObject OnlineMapsLocationServiceBase.marker3DPrefab |
Prefab of 3D marker.
OnlineMapsMarker3D.SizeType OnlineMapsLocationServiceBase.marker3DSizeType = OnlineMapsMarker3D.SizeType.scene |
Marker size type.
float OnlineMapsLocationServiceBase.markerScale = 1 |
Scale of the marker
string OnlineMapsLocationServiceBase.markerTooltip |
Tooltip of the marker
OnlineMapsLocationServiceMarkerType OnlineMapsLocationServiceBase.markerType = OnlineMapsLocationServiceMarkerType.twoD |
Type of the marker.
int OnlineMapsLocationServiceBase.maxPositionCount = 3 |
The maximum number of stored positions.
It is used to calculate the speed.
Action<float> OnlineMapsLocationServiceBase.OnCompassChanged |
This event is called when the user rotates the device
Action OnlineMapsLocationServiceBase.OnFindLocationByIPComplete |
This event is called when the IP location are found
OnGetLocationDelegate OnlineMapsLocationServiceBase.OnGetLocation |
This event allows you to intercept receiving a GPS location
Action<Vector2> OnlineMapsLocationServiceBase.OnLocationChanged |
This event is called when changed your GPS location
Action OnlineMapsLocationServiceBase.OnLocationInited |
This event is called when the GPS is initialized (the first value is received) or location by IP is found
Action OnlineMapsLocationServiceBase.OnPositionRestored |
This event called after map position restored when timeout "Restore After" expires
Vector2 OnlineMapsLocationServiceBase.position = Vector2.zero |
Current GPS coordinates.
Important: position not available Start, because GPS is not already initialized.
Use OnLocationInited event, to determine the initialization of GPS.
int OnlineMapsLocationServiceBase.restoreAfter = 10 |
Use the GPS coordinates after seconds of inactivity.
bool OnlineMapsLocationServiceBase.rotateCameraByCompass = false |
Rotates the camera through a compass. Requires OnlineMapsCameraOrbit component.
float OnlineMapsLocationServiceBase.trueHeading = 0 |
The heading in degrees relative to the geographic North Pole.
Important: position not available Start, because compass is not already initialized.
Use OnCompassChanged event, to determine the initialization of compass.
bool OnlineMapsLocationServiceBase.updateEmulatorPositionByMarker = false |
Specifies the need to update the position of the emulator by marker position.
bool OnlineMapsLocationServiceBase.updatePosition = true |
Specifies whether the script will automatically update the location
bool OnlineMapsLocationServiceBase.useCompassForMarker = false |
Specifies the need for marker rotation
bool OnlineMapsLocationServiceBase.useGPSEmulator = false |
Specifies GPS emulator usage. Works only in Unity Editor.
|
getset |
Is it allowed to update the position.
|
staticget |
Instance of LocationService base.
|
staticgetset |
Instance of marker.
|
get |
Speed km/h. Note: in Unity Editor will always be zero.