I'd like to utilize a marker within my override for onLocationChanged(). Presently a string is being used to post the coordinates on-screen using Toast. I'm confused by the Location Listener. What is the return? How is it passed along to the map as a marker?
What do you mean by "return value"? The method is declared void, so there is no return value.
What do you mean by "it" in "How is it passed along..."? There is no connection between this listener and your code, unless you create one. If you want to set a marker on a map as a result of this method being called, I would expect the code to call a method somewhat like "setMyMarker(location)".
posted 4 years ago
Ulf, thanks for replying!
After considering my issue further, it dawned on me that my question is moot, because I don't actually need to do anything special to show a marker for the user's current location. The Google Maps v2 API offers .setMyLocationEnabled() method. When set to true, the user's current location will be placed on the map and updated accordingly. The only catch is that this is but a layer on the map and does not return the coordinates of the location. It is simply visual. That's fine, though, because I can use my method to get the coordinates.
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Thread Boost - a very different sort of advertising