I am making an application that allows a user to fill out a form. Which adds a point on the map. I would like the user to be able to click on the point right from the map, which would make show from the address search for the title, body, photo and architect information. Screenshots are attached below.
The form is working properly, all the information is saving in the database properly and the pins are appearing on the map after submitting the form.
The problem is that when I click the pin I would like I side bar like this to work:
How would I be able to extract the address from the pin when I click it? I would like to pull data from the datbase and fill in the images, title, architect and body copy. How would I be able to do that. I am very stuck, any help would be appreciated.