Code example for MapFragment

Methods: getMap

    CameraPosition cameraPosition = new CameraPosition.Builder().target(latLang) // Sets the center of the map to Mountain View
                                                                // Sets the zoom 
    // Creates a CameraPosition from the builder 
   * Adds a point to the polyline drawn on the map 
   * @param location 
  public void addPointToPolyline(LatLng latLng) {
    // Instantiates a new Polyline object and adds points to define a rectangle 
    if (poly == null) {
      poly = new PolylineOptions().width(40).color(Color.RED).geodesic(true);
Experience pair programming with AI  Get Codota for Java