added location api support including sending data to server