use input of locationfield when given.

@deiferni