Inspiration

With a large group of friends like ours, you’ll almost always find us together in a lounge, laughing, talking, or sometimes working silently. However, the events it takes to get there often resemble a very different experience. 10 people manage to agree on a meeting time and location, only to find that that lounge is closed. The group trudges back to try a different location, only to find a place that’s extremely loud and packed! Finally, everyone heads to their last known location, where they can finally settle down and begin their work. With so much trial and error in our process, a lot of time is wasted in finding a space with the right environment for our activities.

What it does

With this in mind, we created Lounge Locate, an app that displays lounges, cafes, and libraries in UCSC, with further pop-up information about timings, rush hours, etc. The functionality is simple: click on a lounge location to identify the environment at the given time and see what facilities are available.

How we built it

Using an array of different lounge locations stored in a local .json file, we were able to create custom pins at every lounge’s coordinates that call a pop up function to display information about the lounge when pressed. The pins are designed with an overlaid button that utilizes a state variable integer to access the correct array element and present the pop up view with the right name, description and images. With this design, we were able to create one pop up template that could easily replace the presented information.

Challenges we ran into

As beginners, we faced many challenges with implementing our idea for the app while learning the language and UI at the same time. One of our biggest challenges was overlaying the custom buttons onto the Apple Maps pin and having it present the pop up view with the correct information. While we were able to conceptually identify multiple ways to accomplish this task, it took extensive research to actually implement onto our app. At first, we considered the Apple Maps pins and its selected feature along with a .tag(int) attribute. Our idea was that the integer from .tag() could be used to access the correct element of the array, and the isSelected feature would present the pop up view. After extensive research of the .tag() documentation, we realized this method would not be possible. Next, we considered overlaying a button over the pin using ZStack() with a return value integer of the array element we wanted to access. We realized quickly that returning a value through the button meant that the pop up action would not actually occur, as returning a value terminates the function. We were on the right track to our final implementation. After thorough research, we identified a concept called a state variable, which was an integer value we could assign to the button that could be accessed throughout the program once the button was clicked. This variable was what we passed through as our parameter, and was able to call the correct information per button clicked.

Accomplishments that we're proud of

We are very proud of our perseverance in overcoming obstacles throughout our project and maintaining our initial idea and implementation. While we had a conceptual idea of how we wanted our project to look and function, it took tremendous effort to program our desired features while simultaneously learning the language, which we commend ourselves for accomplishing. One success that was a pivotal turning point in our project was learning how to overlay a button onto the Apple Maps at a specific coordinate and implement the state variable as a parameter to access the array elements. We are very proud of ourselves for working hard to stay consistent with our initial vision for the app we wanted to build.

What we learned

On the technical side, we learned how to build an Apple Maps screen fixed to the UC Santa Cruz College region. We learned to utilize an array of Landmark Objects with inputted coordinates, and how to access its attributes across multiple files through the Swift programming language. We also learned how to overlay pins, buttons, and pop up files on the Apple Maps feature in Swift to display custom buttons pinned to exact coordinates that follow through with a pop up that takes in arguments from a state variable integer assigned to each button. This experience has taught us what it is like to build a fully functional app within a high-stress working environment and a 48 hour time constraint. This hackathon has revealed many of our strengths, which we utilized throughout the event to overcome multiple challenges and prepare well for a successful submission.

What's next for Lounge Locate

Our vision for Lounge Locate is to include more personalized features: set the map to pinpoint and follow the user’s location, allow users to create logins, pick favorite lounges, and filter their view based on their preferences. With the implementation of individual logins, we aim to integrate group coordination through the app, where multiple people can coordinate with nearest or favorite lounge recommendation features.

Built With

Share this project:

Updates