編輯

共用方式為


getCurrentPosition

Returns the current location using the device geolocation capability.

Available for

Model-driven (mobile client) and canvas apps

Syntax

context.device.getCurrentPosition()

Return Value

Type: Promise<Position>

See Promise and Position

Exceptions

See Web service error codes

Device
Power Apps component framework API reference
Power Apps component framework overview