Possible to use location in widget

I have the same issue as well.
Posted a sample script in the widgets thread: