Inspiration
In my community I have seen some stores and restaurants that have strong observance of COVID safety guidelines, and others that I have avoided due to conditions I felt were less safe. I decided to build a tool (safeHERE) to crowdsource observations to inform customers about conditions when making a choice of shopping or dining destinations.
What it does
safeHERE shows either restaurants or retail locations (user's choice) for a region shown in a map. The map has a pin for each venue, and a list is also shown below the map. The flag color on the map or the list corresponds to the aggregate perceived safety level (from red to green). You can tap a flag or list entry to view more details. From there you can also add your own observations on mask use, social distancing, etc. and add an optional comment and picture. There are controls to filter locations by safety level or by venue name.
How I built it
I wrote a native iOS app in Swift. I integrated the HERE iOS SDK and wrote a custom interface and models for using the Data Layers REST API. I used the portal to setup the Houston Data Layers for my app, call the REST APIs from the iOS app, and populate native models I wrote for the returned features. I also created filters to extract features that correspond to a bounding box (i.e. the map view) and category (i.e. Eat/Drink). These results can be further filtered by minimum safety level or by venue name. From these I create the map markers and associated data structures in the app. I created a MongoDB database on the Parse platform to hold user observations. When a user submits observed info for a feature (venue) it gets written to the database associated with the id of the feature.
Challenges I ran into
I was new to the HERE SDK and it took a while to figure out how to integrate with data in the app. The Data Layers API could have used more documentation / examples, but I was able to figure out how to make calls in native Swift code through some trial and error. The returned JSON schema doesn't have a complete definition that I could find. I had to create my own data models by inspecting fetches of large data sets.
Accomplishments that I'm proud of
I was able to get the prototype working that integrates HERE maps, data layer fetches with bounding box and various filters, and a MondoDB backend for user data. It is relatively close to a releasable product.
What I learned
I learned a lot about the HERE iOS SDK and Data Layers. There's a very extensive API for both and it took a while to get the basics worked out.
What's next for safeHERE
The data fetching needs to be optimized for when a user moves around the map. I want to build out a better interface, and some admin features to review and vet submitted user info.
Log in or sign up for Devpost to join the conversation.