This site requires JavaScript, please enable it in your browser!
Greenfoot back
trimil
trimil wrote ...

2016/7/22

Get user's location

trimil trimil

2016/7/22

#
I was wondering if there was any way to get the user's real life location. I came up with the idea after thinking that I could use the Map class to display the user's location in the background of the scenario.
danpost danpost

2016/7/23

#
trimil wrote...
I was wondering if there was any way to get the user's real life location.
The only way would be to have the user input that information.
I came up with the idea after thinking that I could use the Map class to display the user's location in the background of the scenario.
The Map class is a specialized List-type class where each element is a paired set (each pair is a combination of a key value with a related value). It, generally, has nothing to do with cartographic maps.
trimil trimil

2016/7/23

#
I meant the Map class you get when you select "Import Class" under "Edit" in the Greenfoot IDE toolbar at the top.
danpost danpost

2016/7/23

#
trimil wrote...
I meant the Map class you get when you select "Import Class" under "Edit" in the Greenfoot IDE toolbar at the top.
Sorry, my bad. I am still running v2.3 (USB version) which I am very happy with. Obviously, then, I do not have a Map class there; but, I was able to locate it as well as the Weather class to see what you were referring to. Again, the location of a user is "classified" information and cannot be accessed unless the user allows it. So, a map depicting the location of a user is just not ascertainable prior to any user input.
trimil trimil

2016/7/23

#
Okay.
You need to login to post a reply.