Trying to get a marker to go to places on the map (more info in body)

MapApp.aia (108.1 KB)

^^AIA for the project

I'm trying to make it so that when you pick a length for the test, the app will randomly pick a few numbers (for demo it would be two, for 10 it would be ten, etc etc). it would then line those numbers up into a quiz format, and correspond a set of coordinates to a correct answer. I believe using the attached CSV is the most streamlined way to do it, but I cannot figure out how to do it.

I want to prevent the app from using the same country/coords in one quiz more than once, as well as make it not case sensitive.

or downcase while comparing.

Use the techniques discussed in Programming Your App to Make Decisions

mappproject.aia (107.9 KB)

this is under quizscreen btw

I have the code set up so that it pulls the name of a country and its latitude/longitude coordinates from three different lists, using global index for the index. However, when I test the app, the coordinates go to the same few different positions on a straight line. I don't understand why it wouldn't work, as when i put the coordinates in as plain numbers it works.

Try this fix

Try also this
mappproject.aia (107.9 KB)

that didn't work

What doesn't work Christopher? Of course the code example fixes the location placement. It does not fix other issues in your code. I suspect you may have missed changing a Block in the code.

mappprojectPartialFix.aia (109.0 KB)

You do realize what some of the issues are?

  • in your version QuizScreen. your Marker1.Latitude and Longitude were BOTH set to a latitude.
  • you need a trim block associated with your AnswerTextBox.Text (most Androids automatically enter a space when you finish entering text. Make sure ITALY is ITALY and not ITALY . (Italy followed by a space.)
  • changed a select list item list to index in list ....
  • how you use setcoords Procedure(or rather how your original code does not in the SubmitButton.Click
  • etc. etc.

Try again? :cry: There are many ways to get your code to work. Try Dora's suggestion?