Changed method model.addLocation to model.setLocations