Drawing on the map
Run Locatr and press the search button. You should see your map zoom in on an area of interest that
includes your current location (Figure 34.2). (Emulator users will need to have MockWalker running to
get a location fix.)
Figure 34.2 Zoomed-in map
Drawing on the map
Your map is nice, but a little vague. You know that you are in there somewhere, and you know that the
Flickr photo is in there somewhere. But where? Let’s add specificity with some markers.
Drawing on a map is not the same as drawing on a regular view. It is a little easier, in fact. Instead of
drawing pixels to the screen, you draw features to a geographic area. And by “drawing,” we mean,
“build little objects and add them to your GoogleMap so that it can draw them for you.”
Actually, that is not quite right, either. It is, in fact, the GoogleMap object that makes these objects, not
you. Instead, you create objects that describe what you want the GoogleMap to create, called options
objects.
Add two markers to your map by creating MarkerOptions objects and then calling
mMap.addMarker(MarkerOptions).