A support for Locator on WPC is limited but exists. From my experience the only way to make it work is to use LocatorPane
or to use Manipulate with its variable having Locator control type.
Also, Arrow[{{0, 0}, Dynamic@x}]
won't work out of the box, you need to have whole Graphics
wrapped with Dynamic
, otherwise it won't update.
So while on a desktop this works:
DynamicModule[{x = {1, 1}},
Graphics[{Gray, Arrow[{{0, 0}, Dynamic@x}], Locator@Dynamic@x}, PlotRange -> 1, Frame -> True]
]
it won't on a cloud and you need:
Manipulate[
Graphics[{Gray, Arrow[{{0, 0}, x}]}, PlotRange -> 1, Frame -> True],
{{x, {1, 1}}, Locator}
] // CloudDeploy[#, Permissions -> "Public"] &
(*notice no Dynamic on x, instead the body of the manipulate is taking care about updates*)
or
CloudDeploy[
DynamicModule[{x = {1, 1}},
LocatorPane[Dynamic[x],
Dynamic@Graphics[{Gray, Circle[], Arrow[{{0, 0}, x}]}]]
], Permissions -> "Public"
]