Code example for PolylineOptions

Methods: add

0
        //Update polyline data: 
        polylineOptions.add(pos.getLatLng());
    } 
 
    /** 
     * Fetches all the GPS positions registered by this User object. 
     * @return List of positions. The last element is the newest. The list is immutable. 
     */ 
    public List<Coordinate> getPositions() {
        return Collections.unmodifiableList(positions);
    } 
 
    public Coordinate getPosition() { 
        if(positions.size()!=0)
            return positions.get(positions.size()-1);
        return null; 
    } 
 
    public JSONObject toJson() {
        try{ 
            return new JSONObject()