Code example for GoogleMap

Methods: addMarker, addPolygon

0
 
    private void setUpMapIfNeeded() { 
        if (map == null) {
            map = this.getMap();
            if (map != null) {
                map.setMyLocationEnabled(true);
                drawRoute(); 
            } 
        } 
    } 
 
    // TODO Replace hardcoded positions 
    public void drawRoute() { 
        DrawRouteTask downloadTask = new DrawRouteTask();
        downloadTask.execute("Toronto", "Montreal");
    } 
 
    @Override 
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return super.onCreateView(inflater, container, savedInstanceState);
    }