Introduction To Google Maps on Android

Hi, I'm maciej

  • work @ EL Passion
  • like biking
  • like the idea behind bitcoin
  • Android Maps Extensions


                    



you?

  • Android developers?
  • IDEs ready?
  • Interactive mode?




Google Maps Android API v2



Setup

  • enable Google Maps Android API v2
  • generate SHA1 from signing key
  • create project on Cloud Console
  • create API key from SHA1 + package.name



SETUP (cont.)

  • install Google Play Services from SDK Manager
  • add it as dependency to your project
  • add many things to AndroidManifest.xml
  • finally add MapFragment somewhere

Boring theory

  • MapView, MapFragment, SupportMapFragment
  • GoogleMap
  • visual objects
    • Polyline, Polygon, Circle
    • GroundOverlay, TileOverlay
    • Marker
  • loads of callbacks / listeners
    • OnMapClickListener
    • OnMarkerDragListener
    • SnapshotReadyCallback
  • Projection



What can we do?

  • a simple client app
  • loading nearby pubs from Google Places API
  • display Markers
  • go to the nearest pub
  • Foursquare clone? we can do that already




Let's Build something COOL




GMPaint



Requirements?

  • enable/disable edit mode
  • dynamically add visual objects
  • works across configuration changes
  • persistance

Introduction To Google Maps on Android

By Maciej Górski

Introduction To Google Maps on Android

  • 1,918