diff --git a/README.md b/README.md index 961ae400..668f90f6 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,24 @@ Google Code-in users should checkout the **c_in_refine** branch for all tasks. You'll have all the necessary information to procede in there. +## Code of Conduct and Contribution Practices + +Please help us follow the best practice to make it easy for the reviewer as well as the contributor. +We want to focus on the code quality more than on managing pull request ethics. Follow [Github Flow](https://help.github.com/articles/github-flow/). + +- [People before code](http://hintjens.com/blog:95): If any of the following rules are violated, the pull-requests must not be rejected. This is to create an easy and joyful onboarding process for new programmers and first-time contributors. + +- Single commit per pull request and name the commit as something meaningful + +- Reference the issue numbers in the commit message if it resolves an open issue. Follow the pattern `Fixes # ` + +- Provide relevant screenshot for easier review. + +- In case there are multiple commits on the PR, the commit author should squash them. + +- Avoid duplicate PRs, if need be comment on the older PR with the PR number of the follow-up (new PR) and close the obsolete PR yourself. + +Happy Contributing! ## License diff --git a/kute-android-app/app/src/main/java/com/scorelab/kute/kute/LandActivity.java b/kute-android-app/app/src/main/java/com/scorelab/kute/kute/LandActivity.java index 63236475..f54a8b25 100644 --- a/kute-android-app/app/src/main/java/com/scorelab/kute/kute/LandActivity.java +++ b/kute-android-app/app/src/main/java/com/scorelab/kute/kute/LandActivity.java @@ -183,6 +183,7 @@ public void onClick(View v) { .findFragmentById(R.id.mainMapView); mapFragment.getMapAsync(this); + } @Override @@ -309,6 +310,10 @@ public void handleTask(String activity, String type, String vehname, String vehk @Override public void onMapReady(GoogleMap googleMap) { mGoogleMap = googleMap; + + //to zoom in + mGoogleMap.setOnCameraMoveStartedListener(this); + mGoogleMap.setMaxZoomPreference(14.0f); if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { // TODO: Consider calling @@ -323,6 +328,16 @@ public void onMapReady(GoogleMap googleMap) { mGoogleMap.setMyLocationEnabled(true); } + @Override + public void onCameraMoveStarted(int reason) { + + if (reason == OnCameraMoveStartedListener.REASON_GESTURE) { + mGoogleMap.animateCamera(CameraUpdateFactory.zoomIn()); + Toast.makeText(this, "The user gestured on the map.", + Toast.LENGTH_SHORT).show(); + } + } + @Override public void onLocationChanged(Location location) { LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());