GetJedi/app/src/main/java/edu/getjedi/frontend/mobile/state/ClientLoggedState.java
private void updateMap() {
        cleanMarkers();
        try {
            for (int i = 0; i < services.length(); i++) {
                JSONObject service = services.getJSONObject(i);
                for (int j = 0; j < users.length(); j++) {
                    JSONObject user = users.getJSONObject(j);
                    if (service.getString("professionalId").equals(user.getString("_id")) && filterPrice(service.getInt("hourlyPrice"))
                            && filterRay(user.getString("latitude"), user.getString("longitude"))){
                        drawMarkerOnMap(Double.parseDouble(user.getString("latitude")),
                                Double.parseDouble(user.getString("longitude")),
                                service.getString("category"),
                                service.getString("serviceName"),
                                service.getString("description"),
                                service.getString("hourlyPrice"),
                                user.getString("name"),
                                user.getString("lastName"),
                                user.getString("mail"));
                        break;
                    }
                }
            }
        }catch (JSONException e){
            e.printStackTrace();
        }
    }
/**
     * Draws into the Google Map all the services makers, and populate them with service and professional information.
     * Called for each map update.
     */
Draws into the Google Map all the services makers, and populate them with service and professional information.
Called for each map update.
Draws into the Google Map all the services makers and populate them with service and professional information . Called for each map update .
private void updateMap() {
        cleanMarkers();
        try {
            for (int i = 0; i < services.length(); i++) {
                JSONObject service = services.getJSONObject(i);
                for (int j = 0; j < users.length(); j++) {
                    JSONObject user = users.getJSONObject(j);
                    if (service.getString("professionalId").equals(user.getString("_id")) && filterPrice(service.getInt("hourlyPrice"))
                            && filterRay(user.getString("latitude"), user.getString("longitude"))){
                        drawMarkerOnMap(Double.parseDouble(user.getString("latitude")),
                                Double.parseDouble(user.getString("longitude")),
                                service.getString("category"),
                                service.getString("serviceName"),
                                service.getString("description"),
                                service.getString("hourlyPrice"),
                                user.getString("name"),
                                user.getString("lastName"),
                                user.getString("mail"));
                        break;
                    }
                }
            }
        }catch (JSONException e){
            e.printStackTrace();
        }
    }
private void updateMap ( ) { cleanMarkers ( ) ; try { for ( int i = 0 ; i < services . length ( ) ; i ++ ) { JSONObject service = services . getJSONObject ( i ) ; for ( int j = 0 ; j < users . length ( ) ; j ++ ) { JSONObject user = users . getJSONObject ( j ) ; if ( service . getString ( "professionalId" ) . equals ( user . getString ( "_id" ) ) && filterPrice ( service . getInt ( "hourlyPrice" ) ) && filterRay ( user . getString ( "latitude" ) , user . getString ( "longitude" ) ) ) { drawMarkerOnMap ( Double . parseDouble ( user . getString ( "latitude" ) ) , Double . parseDouble ( user . getString ( "longitude" ) ) , service . getString ( "category" ) , service . getString ( "serviceName" ) , service . getString ( "description" ) , service . getString ( "hourlyPrice" ) , user . getString ( "name" ) , user . getString ( "lastName" ) , user . getString ( "mail" ) ) ; break ; } } } } catch ( JSONException e ) { e . printStackTrace ( ) ; } }
Draws into the Google Map all the services makers, and populate them with service and professional information.
Draws into the Google Map all the services makers and populate them with service and professional information .