Week 8: "Spring Break"
Amazing description that will astound even myself with its wisdom
Amazing description that will astound even myself with its wisdom
This has been a productive week right before Spring Break. I have been able to make progress on multiple things this week and one in particular is that I was able to place a pin, that was hardcoded, onto a google map. This is exciting because the API documentation for google maps is not the most clear about how certain functions and code blocks fit together. The main issue that I had been running into was that certain javascript code blocks don't seem to like being called from a seperate file. I am investigating this because having a seperate javascript file would be nice. Other things involving the map is that I am researching how to customize the pins to the custom ones that I designed for my application.
Besides that though, I plan on trying to relax over spring break before I dive headfirst back into my project, but I still plan to get some work done that should not be too intenisve to work on. For instance, I have been able to begin writing the edit and delete functions for users. I also plan on setting up the backend structure for my application to save myself from the likely headache of organizing things near the end. This way I can have an organized space for me to add things into the main version without having to specify weird file paths and not have multiple non-developmental copies floating around.
A hard coded pin on a google map
This week has been exciting in the sense that things have started to come together and I am now saving json encoded data to a file. This encoded data can then be used to display photos on a google map.Incidentally, I can reuse, with small modifications, much of my code to make a function that allows users to edit their photos. The only challenges that might show up is making sure to not overwrite data and to successfully change the encoded data and not adding a new entry in the json file. As of this moment, I am not writing all of the data that needs to be in this encoded data as I have not created the means for the data to be filled yet. Some of this data includes the user id and I am still working out some bugs in the unique id's for each photo. For next steps in this upcoming week, I will be meeting with Dr. McVey-Pankratz about getting a google map up and running so I can begin displaying photos. Other than that though, it will be plenty of bug testing/fixes and writing of different functions that users will have access to when using my program.
This week saw bugs fixed and involved lots of planning out how someone interacts with my program. At the start of the week, Dr. McVey-Pankratz helped me solve why certain JPGs were not able to be uploaded. The issue was that the default upload size is 2 MB so anything bigger than that fails. For now, I am capping photo uploads to 2 MB until we can adjust the max file size when uploading to the server. I added an event handler using javascript that will check the size of any to be uploaded photo and will alert the user if the file is too big.
In the later half of the week, Dr. McVey-Pankratz also helped me work through what types of users had to exist in the context of my project and what each respective one had access to and could do within the framework of my project. There are currently three "types" of users. The first is a base user. This user will be what everyone who wishes to upload a photo will be. They will have the ability to upload photos as well as edit and delete their already uploaded photos (They won't be able to modify other users photos though). The second is an admin user who will have more access than a regular user. They can modify any photo's data as well as delete photos. The final type of user is defined as "other". This type of user only has access to look at public photos. Other than that, we talked about the general timeline of my project.
This is a shorter update but worry not, this week has been one where some roadblocks have been cleared. I would like to thank Abby Kramer for helping me out with gaining access to the google maps API. Other than that though, I have continued working on the program that grabs the metadata out of photos. For the most part, when I upload an image it will pull the available meta data out of the photo. I am in the process of planning out how I want to prompt the user to enter any missing information that could not be found/pulled from the metadata. I am using the exif_read_data function for grabbing the metadata though. This function works really well for JPGs, but not for other formats like pngs or HEIC. I am also experiencing a weird bug where certain JPGs can't be uploaded and I am debugging that currently.
A very rough example of the backend of the upload program.
This week has been an interesting one since I am now working on a portion of my project that I had not initially planned on working on yet. As I talked about in the previous blog post, I was trying to start working with the google API and go from there. Unfortunately I ran into an issue, weird google terms of service, that forced me to pivot temporarily. I am now coding a program that can be run when a user uploads a photo that will grab relevant data from the photo, such as gps coordinates , and attempt to locate the photo as best it can with the available meta data. If it is unable to get enough information from the photos meta data then I plan on the program prompting the user to fill out the necessary information. As of the time of me writing this, I have run into the issue where I don't seem to have "access to local resources", I ran into this issue when trying to test my code with just local files first. I don't know if this is a setting thing or something else, but I am actively investigating it.
I spent most of this week thinking about my project and how exactly I would need to spend my time in order to do it. I have also finished coding a website for my project in order to help me practice some html and css. While I'm sure that the website will go through a couple of minor changes throughout this semester, I think that it has already turned out really well. Next, I have found out where I can gain access to the api key for google maps so that I can truly begin the coding portions of my project. Finally, I have started thinking about how I want to users to see images displayed on their device amongst other logistical questions.
Image of some initial designs
This is my first blog entry for my Capstone project! Most of this week has been spent getting things setup for myself, so I can dive headfirst into this project with a solid footing. Much of the setup has been learning how to code in html, css. I also began to research whether to use google maps or arcGIS's API for the map in my project. I also began thinking about what exactly my project would need to function.