Change location of the code that deals with direction service.
Now is init only when a "jsmap" object is initialised