locate service: allow customisation

Fixes #2961