I've a problem with a kml file. So I pushed the kml file (kml.kml) and my properties file to my emulator misc/location/mygps
the I write a app with this code:
Using java Syntax Highlighting
- MapController mc = mymapview.getController();
- LocationManager myLocationManager = (LocationManager)getSystemService(LOCATION_SERVICE);
- // Get the first Providers available
- List<LocationProvider> providers = myLocationManager.getProviders();
- LocationProvider provider = providers.get(1);
- //Returns a new location fix from the given provider:
- Location curLoc = myLocationManager.getCurrentLocation("mygps");
- Point curLocAsPoint = new Point((int)(curLoc.getLatitude()* 1E6), (int)(curLoc.getLongitude()*1E6));
- mc.animateTo(curLocAsPoint);
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
My map shows a point near Afrika but it should be a location in Europe ?! I set these permissions in the manifest.xml as well:
Using java Syntax Highlighting
- <uses-permission android:name="android.permission.ACCESS_LOCATION">
- </uses-permission><uses-permission android:name="android.permission.ACCESS_GPS">
- </uses-permission>
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
I hope someone can help me. Do I forget to push some files to emulator perhaps ?
Thanks in advance !




