convert gps coord format in js instead of server