• Creates an expression that represents the map (or world) position of the feature.

    For example, this can be used to style dependent on the distance of the mouse to the feature. Note that the mouse parameter in the code example below needs to be updated when the mouse moves (not shown).

      var _ = ExpressionFactory;
    var position = _.positionAttribute();
    var mouseParam = _.pointParameter({x: 0, y: 0, z: 0});//Initial value. Needs updating.
    var distanceToMouse = _.distance(position, mouseParam);//World (Euclidean) distance.

    var radiusOfEffect = _.number(1000000);//Only apply when the mouse is (relatively) close to the feature.
    var mouseMultiplier = _.ifThenElse(_.lt(distanceToMouse, radiusOfEffect),
    _.divide(radiusOfEffect, distanceToMouse),
    _.number(1));
    var colorExpression = _.multiply(_.color("rgba(127, 127, 127, 1)"), mouseMultiplier);//Brighten as the mouse moves closer.

    Returns Expression<Vector3>

    An expression that represents the position of a feature.