My Feature

I decided to try doing a feature with Google Maps, in fact this was something I wanted to do last trimester, but there was too much to learn I decided to put it off as a personal project. I did not make any progress, but then for this trimester, it was suggested that I make my feature surrounded by Google Maps API.

Google Maps API was really difficult to use, but there were a lot of resources around it. It was still difficult to obtain an API and I spent a majority of my time figuring how it would work. I turned to RapidAPI because I was running low on time and I found MapsTiles, where I was able to make a program where the user could input coordinates and then it would show a map. I contacted MapsTiles regarding credit, but they also gave me a suggestion to use Geocoding in order to make it easier for the user, but this kind of broke my code and I was not able to implement it

Purpose and Function

Purpose: In order to help users plan their trip better accordingly to the trip that they have. They will be able to use the map and see what is next to the airport and find activities, restaurants, or even hotels

Function: The function of this program is that users will input an airport and then a Geocoding API will convert that into coordinates and then the coordinates will be used to output a map

Goals

  • Make a visually appealing website and make the UI of my feature look nice and friendly for others to use
  • Make a program that allows a user to find the total distance between two airports
  • Show users a path between the two airports that can show them their route if they take that flight
  • To make sure the backend is constantly updated with any things that are inputted in the frontend and then shown using the database
  • Have a database that will display the trip of the person with their first location, second location, and the total distance
  • Implement create, read, update, and delete options into my feature

Challenges

  • Obtaining a API key for Google Maps API
  • Getting started with SQLAlchemy and sqlite.db
  • Getting Data to show and be formatted correctly on our site
  • Trouble getting the data from the textboxes into the API in order to output the map - My Computer broke during Week 19, so I couldn’t do the assignment and this assignment turned out to be pretty important part of our final project, but I had no idea how to use sqlite.db, so the fact that my computer had broke really made things harder for me and I could not really figure out how to make a database, so I had to look at many other people’s files and find out how it worked, this took a majority of break, and I couldn’t finish it before school started

Setbacks

  • Originally, I wanted to make a calendar to show the flights that people could take, but that was going to be harder to implement
  • I also wanted the users to be able to delete their inputs from the database
  • I could not figure out how exactly how to allow the users to update their inputs into the database
  • I wanted the users to be able to input two airports so the distance between the two could be found easily, this was going to be hard because the API that did support this cost money, so I decided to keep that option for later and try and find another API on RapidAPI
  • I wanted to use Google Maps API, but I was so unfamiliar with their software and how to use it that I decided to just use RapidAPI instead and find an API that worked similarly to Google Maps API, but was easier to implement

POST and GET

A POST method is used to submit a new coordinate to the database. “Data” is the variable that is used to represent the list of coordinates that later is used to output a map.

List

My list would probably be the API and it has a list of many airports and locations which the user can input. Data is the data of the locations that the program fetches from our database using a GET request - the data is represented by JSON. This data is used to make the maps with many other locations near by to it.

Two Calls

The variable that represents the list is an API. The api is the data of the cars that the program fetches from our database using a GET request - the data is represented by JSON. The first call makes a search within the Geocoding API and calls it to find the coordinates of a location. The Second call would be to the second API which uses MapsTiles in order to show that map after the coordinates have been received.

Results of Calls

The first result of the first call would be the coordinates of the locations that the user has inputted.

The second result of the second call would be taking the coordinates from the first call and then using that to output a map.