@@ -32,75 +32,122 @@ Although it was not technically required by the assignment instructions, we want
Specifically, we wanted to allow user input for these decisions:
**1.**Inform the user that the programme will download the CSV and KML files and **ask them for permission to store the files locally**.
**1.**Allow the user to **accept the default directory or set a new one.**
<details><summary> See the Code</summary>
```java
ScanneraskUser=newScanner(System.in);// warning coming from non-closed scanner. Note: if we close it, subsequent scanners fail to work.
Stringanswer;
// welcome and information for user
System.out.println("Hello! Welcome to this Google Earth Tweet and WMS Mapper!\n\n"
+"This programme will:\n"
+"1: download an image of Boston from a WMS\n"
+"2: convert it into a KML structure\n"
+"3: download a tweets.csv file from the web\n"
+"4: convert it into a KML structure\n"
+"5: launch both kml files in Google Earth\n\n"
+"The downloaded files will be stored at C:\\Users\\Public\\Documents\n"
+"If this is fine, please enter Y below and hit enter to continue! If not, we will stop the programme and you can manually change the directory at the very top of this class's code.");
+"5: create a KML file for a tour in Google Earth\n"
+"6: launch all kml files in Google Earth\n\n"
+"By default, the downloaded files will be stored at: C:\\Users\\Public\\Documents"
+"\nIf this is fine, please enter Y below and hit enter to continue! If not, enter anything else to set a new directory.");
answer=askUser.next();
// askUser.close();
StringnewDirectory=null;
// if yes, set directory to the default and return directory
**2.** Ask the user if they would like to **see additional information** on the WMS while the programme is running.
<details><summary>See the Code</summary>
```java
ScanneraskServiceInfo=newScanner(System.in);//warning coming from non-closed scanner. Note: if scanner is closed subsequent scanners fail to work.
Stringanswer;
// user interaction: offer additional information
ScanneraskServiceInfo=newScanner(System.in);// warning coming from non-closed scanner. Note: if scanner is closed subsequent scanners fail to work
Stringanswer1;
Stringanswer2;
System.out.println("\nWould you like additional information on the WMS service while the programme runs? Type Y for yes or anything else for no and hit enter.");
System.out.println("\tThe WMS capabilities are being retreived from a server called: "+serverName+"\n\tAnd the server's title is: "+serverTitle+"\n\t"+
"The requested image will be stored as a .png with dimensions of 1000 x 1000 pixels.\n\t"+
"The coordinate reference system is set to ESPG:4326.");
System.out.println("\tThe WMS capabilities are being retreived from a server called: "+capabilities.getService().getName()+"\n\t"// method to access service infos
+"The server's title is: "+capabilities.getService().getTitle()+"\n\t"
+"The requested image will be stored as a .png with dimensions of 1000 x 1000 pixels.\n\t"
+"The coordinate reference system is set to ESPG:4326.\n\t"
+"The requested GetMap URL is: "+request.getFinalURL());
System.out.println("\nPlease let us know when you are done with this step. Type any keyword and press enter:");
**3.** Ask the user if they would like to **proceed to launch** Google Earth.
**3.** Ask the user if they would like to **proceed to launch** Google Earth. This step also made sure that the programme would halt again (giving the user some time to actually read the console output before Google Earth launches). If the users does not answer with some form of "yes", the programme will end with a friendly good-bye message.
<details><summary> See the Code </summary>
```java
staticvoidaskUser2(){
// ask user to proceed with google earth launch
ScanneraskContinue=newScanner(System.in);
Stringanswer1;
System.out.println("Would you like to proceed to launch Google Earth now? Type Y for yes or anything else for no and hit enter.");
System.out.println("We have created a small tour to show you the WMS and Tweets in Google Earth. It will automatically begin when Google Earth is launched.\n"
+"Would you like to proceed to launch Google Earth now? Type Y for yes or anything else for no and hit enter.");
answer1=askContinue.next();
askContinue.close();
// if yes, proceed with programme execution. Else, exit programme.