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).
varradiusOfEffect = _.number(1000000);//Only apply when the mouse is (relatively) close to the feature. varmouseMultiplier = _.ifThenElse(_.lt(distanceToMouse, radiusOfEffect), _.divide(radiusOfEffect, distanceToMouse), _.number(1)); varcolorExpression = _.multiply(_.color("rgba(127, 127, 127, 1)"), mouseMultiplier);//Brighten as the mouse moves closer.
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).