Wikitude ARchitect v3.2 API Documentation

Wikitude ARchitect > AR > ActionRange
Filters

Class ActionRange - extends ActionArea

An ActionRange defines a circle around a certain Location. Events are fired as soon as the user enters or leaves this circle.

Example:
var location1 = new AR.GeoLocation(47.77317, 13.069929);
var actionRange = new AR.ActionRange(location1, 500);
var location2 = new AR.GeoLocation(48.77317, 13.069929);
var inArea = actionRange.isInArea(location1); //inArea = true
var inArea = actionRange.isInArea(location2); //inArea = false
On creation, setup parameters can be passed to customize the properties of the ImageDrawable.

var actionRange2 = new AR.ActionRange(location1, 500, {
onEnter : function() {
actionRange2.enabled = false; //an ActionArea which can only be entered once
}
});

Constructor

ActionRange ( location , radius , options )
Parameters:
location <Location> a single Location defining the center point of the circle.
radius <float> the radius of the ActionRange in meters.
options <object> Setup-Parameters to customize additional object properties.

Accepted options-properties are
  • enabled
  • onEnter
  • onExit

Properties

geoLocation - GeoLocation

Deprecated: Use location instead.

location - Location

The Location object which defines the center of the ActionRange

positionX - float

Specifies the position of the left edge of the radar background image. The value must be between 0 and 1. A value of 0 places the left edge of the radar background image on the left edge of the screen, 0.5 places the left edge horizontally in the middle of the screen.
Deprecated: Use container instead

positionY - float

Specifies the position of the top edge of the radar background image. The value must be between 0 and 1. A value of 0 places the top edge of the radar background image on the top edge of the screen, 0.5 places the top edge vertically in the middle of the screen.
Deprecated: Use container instead

radius - float

The radius of the ActionRange, in SDUs.

width - float

Specifies the width of the radar background image, in percent of the portrait screen width. The value must be between 0 and 1. A value of 0.1 sizes the radar background image in a way that the width of the image makes up 10% of the entire screen width.
The aspect ratio of the radar background image will not be changed, the height of the radar will thus be automatically calculated.
Deprecated: Use container instead

Properties inherited from ARchitectObject:

Properties inherited from ActionArea:

Methods inherited from ARchitectObject:

Methods inherited from ActionArea:


Copyright © 2013 Wikitude GmbH. All rights reserved.