Moved all mapping api to server code