模拟器不支持获取当前位置。因此,在这种情况下,要在模拟器中运行,您需要加载 kml。
1. Go to DDMS repository.
2. select current running emulator
3. scroll down load the kml and run
4. run the app on this emulator
位置.kml
<?xml version="1.0" encoding="UTF-8" ?><kml xmlns="http://earth.google.com/kml/2.0">
<Folder>
<name>Sisyphus Peak from Wilmot Saddle</name>
<open>1</open>
<Placemark>
<name>Ashburn</name>
<Point>
<coordinates>-77.49009453474123,39.01333532337567,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-1</name>
<Point>
<coordinates>-77.48302697807792,39.00625954769475,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-2</name>
<Point>
<coordinates>-77.47311743511652,39.00018050891467,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-8</name>
<Point>
<coordinates>-77.42401333359562,38.97922939627798,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-9</name>
<Point>
<coordinates>-77.42003559704499,38.97778114326241,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-10</name>
<Point>
<coordinates>-77.41751898937368,38.97662869617142,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-11</name>
<Point>
<coordinates>-77.4138528755813,38.97459310765229,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-12</name>
<Point>
<coordinates>-77.40659262377542,38.97146307963115,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-13</name>
<Point>
<coordinates>-77.40273606167617,38.96926642020819,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-14</name>
<Point>
<coordinates>-77.40027538351835,38.9670792991095,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-15</name>
<Point>
<coordinates>-77.397503898305,38.96335043764458,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-16</name>
<Point>
<coordinates>-77.39388172459363,38.96070433695704,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-17</name>
<Point>
<coordinates>-77.3897006097812,38.95805419575319,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-22</name>
<Point>
<coordinates>-77.36014667981878,38.95215584985607,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-23</name>
<Point>
<coordinates>-77.35481732900948,38.9512321715715,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-24</name>
<Point>
<coordinates>-77.34840625130377,38.94965466871911,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-25</name>
<Point>
<coordinates>-77.34310832451432,38.94852158323671,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-26</name>
<Point>
<coordinates>-77.3375389604111,38.94651446647728,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-27</name>
<Point>
<coordinates>-77.33316520209574,38.94474914006099,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-28</name>
<Point>
<coordinates>-77.3262314555746,38.94404490272601,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>point-29</name>
<Point>
<coordinates>-77.31866962122956,38.94550595598364,0</coordinates>
</Point>
</Placemark>
</Folder>
</kml>