请查看下面的链接: http://www.cs.nott.ac.uk/~cmg/G54UBI/coursework2/GPS_and_Maps.html 获取GPS位置使用AppInventor中的位置传感器: http://www.cs.usfca.edu/~wolber/appinventor/locationsensor.html 在JavaScript中使用GPS,包括PhoneGap: http://docs.phonegap.com/phonegap_geolocation_geolocation.md.html#Geolocation 请注意底部的“怪癖”,即要在模拟器上获得模拟GPS,必须将选项“enableHighAccuracy”设置为“true”。似乎Android 2.3.3模拟器存在模拟位置的问题(它似乎会崩溃/重新启动模拟器)。请避免使用此版本的模拟器;请尝试使用Android 2.2。
Double lat = Double.valueOf(MockLoc[0]); location.setLatitude(lat); Double longi = Double.valueOf(MockLoc[1]); location.setLongitude(longi);
我不知道Phonegap中是否有类似的功能。 - priteshbaviskar