creates getCoordinates function via AJAX