Draw the blue point (gps position)?

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Draw the blue point (gps position)?

Postby kameltreiber84 » Wed Feb 10, 2010 11:58 am

Hi there!
I just manually triggered the LocationChanged event and moved the map to the position. As a result the emulator ist no necassary, I want to set the GPS coordinates in my code, not be using the emulator.

That works fine. But the blue GPS point is not visble when I move to the location.

Is tehre a way to draw that blue point on the map via code and without the emulator?

Best regards.
kameltreiber84
Junior Developer
Junior Developer
 
Posts: 18
Joined: Tue Jan 26, 2010 10:24 pm

Top

Postby gpmoo7 » Sat Feb 13, 2010 6:53 pm

http://code.google.com/android/add-ons/ ... erlay.html

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. MapView mapView = (MapView) findViewById(R.id.mapview);
  2.  
  3. MyLocationOverlay myLocationOverlay = new MyLocationOverlay(this, mapView);
  4.  
  5. mapView.getOverlays().add(myLocationOverlay);
  6.  
  7. myLocationOverlay.enableMyLocation();
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


Don't forget:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. @Override
  2.  
  3. protected boolean isLocationDisplayed() {
  4.  
  5.         return true;
  6.  
  7. }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4

And:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  2.  
  3. <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Parsed in 0.001 seconds, using GeSHi 1.0.8.4
My Android App: http://montrealtransit-for-android.googlecode.com/
-----
HTC Nexus One (AT&T/Canada)
HTC Magic (Rogers/EBI1)
HTC Dream (Rogers)
http://twitter.com/gpmoo7
gpmoo7
Freshman
Freshman
 
Posts: 7
Joined: Sat Jun 06, 2009 3:09 pm
Location: Montreal, Canada

Top

Return to Map Problems

Who is online

Users browsing this forum: Google [Bot] and 4 guests