Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Henrique Voni12,296 Points
Google Map is laggy if i get user location on start
I am trying to display a Google Map on my Activity as a MapFragment and set a marker to my current location when the app starts. But if i do, the map loads badly and laggy.
The method i'm using to get the location is via locationManager.getLastKnownLocation()
What is the best way to do it so the map can run smoothly? It only happens with user location. If i set a marker with a hardcoded lat/long, the map runs nicely.
Thanks a lot. Henrique