0
Android Application Development      Google Maps API V2 Part 3                            ●   Add Markers                 ...
Google Maps API V2                            Markers [1]1. Markers identify locations on the map.2. Markers use a standar...
Google Maps API V2   Markers [2]Add a Marker:
Google Maps API V2                                           Markers [3]  Customize a Marker:Position (Required): The LatL...
Google Maps API V2                          Markers [4]Customize a Marker: Changing default Icon 1. fromAsset(String asset...
Google Maps API V2                         Markers [5] Event HandlingThe following events can be listened to:1. Marker cli...
Google Maps API V2                                      Shapes The Google Maps API for Android offers some simple ways for...
Google Maps API V2   Polylines
Google Maps API V2                    PolygonsCircles can also be added similarly
Google Maps API V2        Customizing AppearancesProperties:   1. Stroke COlor   2. Fill Color   3. Stroke Width   4. Geod...
Upcoming SlideShare
Loading in...5
×

Day 13: Google Maps Android API V2 Part 3

13,082

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
13,082
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
253
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Day 13: Google Maps Android API V2 Part 3"

  1. 1. Android Application Development Google Maps API V2 Part 3 ● Add Markers ● Drawing Shapes (Lines, Polygons & Circles) Ahsanul Karim karim.ahsanul@gmail.com http://droidtraining.wordpress.com
  2. 2. Google Maps API V2 Markers [1]1. Markers identify locations on the map.2. Markers use a standard icon.3. Its possible to change the icons color,image or anchor point via the API.4. Markers are objects of type Marker, andare added to the map with the GoogleMap.addMarker(markerOptions) method.5. Markers are designed to be interactive.Markers receive click events, for example,and are often used within event listeners tobring up info windows.
  3. 3. Google Maps API V2 Markers [2]Add a Marker:
  4. 4. Google Maps API V2 Markers [3] Customize a Marker:Position (Required): The LatLng value for the markers position on the map. Thisis the only required property for a Marker object.Title: A string thats displayed in the info window when the user taps the marker.Snippet: Additional text thats displayed below the title.Draggable: Set to true if you want to allow the user to move the marker. Defaultsto false.Visible: Set to false to make the marker invisible. Defaults to true.Anchor: The point on the image that will be placed at the LatLng position of themarker. This defaults to the middle of the bottom of the image.Icon: A bitmap thats displayed in place of the default marker image. You cantchange the icon once youve created the marker.
  5. 5. Google Maps API V2 Markers [4]Customize a Marker: Changing default Icon 1. fromAsset(String assetName) 2. fromBitmap (Bitmap image) 3. fromFile (String path) 4. fromResource (int resourceId)
  6. 6. Google Maps API V2 Markers [5] Event HandlingThe following events can be listened to:1. Marker click events2. Marker drag events3. Info window click events
  7. 7. Google Maps API V2 Shapes The Google Maps API for Android offers some simple ways for us to add shapes to our maps in order to customize them for your application.● A Polyline is a series of connected line segments that can form any shape you want and can be used to mark paths and routes on the map.● A Polygon is an enclosed shape that can be used to mark areas on the map.● A Circle is a geographically accurate projection of a circle on the Earths surface drawn on the map.
  8. 8. Google Maps API V2 Polylines
  9. 9. Google Maps API V2 PolygonsCircles can also be added similarly
  10. 10. Google Maps API V2 Customizing AppearancesProperties: 1. Stroke COlor 2. Fill Color 3. Stroke Width 4. Geodesic Segments 5. Z-index 6. Visibility
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×