<commit_before>package com.example.v001ff.footmark;

import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;

import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;


public class MapsActivity extends FragmentActivity implements OnMapReadyCallback,View.OnClickListener {

    private GoogleMap mMap;
    private final int REQUEST_PERMISSION = 1000;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        //対応検討中(も)
        //InputSpotFragment fragment = new InputSpotFragment();
        //getFragmentManager().beginTransaction().add
        //        (android.R.id.content, fragment, "InputSpotFragment").commit();

        setContentView(R.layout.activity_maps);
        if (Build.VERSION.SDK_INT >= 23)
            checkPermission();
        else
            start();
    }


    public void start() {
        SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
                .findFragmentById(R.id.map);
        mapFragment.getMapAsync(this);
    }

    @Override
    //開いたときに実行される関数
    public void onMapReady(GoogleMap googleMap) {
        mMap = googleMap;
        LatLng yu = new LatLng(33.956416, 131.2725288);
        mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
        mMap.addMarker(new MarkerOptions().position(yu).title("Marker in YU"));
        mMap.moveCamera(CameraUpdateFactory.newLatLng(yu));


        /*//LocationManagerの取得
        LocationManager locationManager = (LocationManager)this.getSystemService(Context.LOCATION_SERVICE);
        //GPSから現在地の情報を取得
        Location myLocate = locationManager.getLastKnownLocation("gps");
        //MapControllerの取得
        MapController MapCtrl = mapView.getController();
        if(myLocate != null){
        //現在地情報取得成功
        //緯度の取得
        int latitude = (int) (myLocate.getLatitude() * 1e6);
        //経度の取得
        int longitude = (int) (myLocate.getLongitude() * 1e6);
        //GeoPointに緯度・経度を指定
        GeoPoint GP = new GeoPoint(latitude, longitude);
        //現在地までアニメーションで移動
        MapCtrl.animateTo(GP);
        //現在地までパッと移動
        MapCtrl.setCenter(GP);
        }else{
        //現在地情報取得失敗時の処理<commit_msg>マーカーの画像変更<commit_after>package com.example.v001ff.footmark;

import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;

import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;


public class MapsActivity extends FragmentActivity implements OnMapReadyCallback,View.OnClickListener {

    private GoogleMap mMap;
    private final int REQUEST_PERMISSION = 1000;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        //対応検討中(も)
        //InputSpotFragment fragment = new InputSpotFragment();
        //getFragmentManager().beginTransaction().add
        //        (android.R.id.content, fragment, "InputSpotFragment").commit();

        setContentView(R.layout.activity_maps);
        if (Build.VERSION.SDK_INT >= 23)
            checkPermission();
        else
            start();
    }


    public void start() {
        SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
                .findFragmentById(R.id.map);
        mapFragment.getMapAsync(this);
    }

    @Override
    //開いたときに実行される関数
    public void onMapReady(GoogleMap googleMap) {
        mMap = googleMap;
        LatLng yu = new LatLng(33.956416, 131.2725288);
        mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
        mMap.addMarker(new MarkerOptions().position(yu).title("Marker in YU")
                .icon(BitmapDescriptorFactory.fromResource(R.drawable.googleg_disabled_color_18)));
        mMap.moveCamera(CameraUpdateFactory.newLatLng(yu));


        /*//LocationManagerの取得
        LocationManager locationManager = (LocationManager)this.getSystemService(Context.LOCATION_SERVICE);
        //GPSから現在地の情報を取得
        Location myLocate = locationManager.getLastKnownLocation("gps");
        //MapControllerの取得
        MapController MapCtrl = mapView.getController();
        if(myLocate != null){
        //現在地情報取得成功
        //緯度の取得
        int latitude = (int) (myLocate.getLatitude() * 1e6);
        //経度の取得
        int longitude = (int) (myLocate.getLongitude() * 1e6);
        //GeoPointに緯度・経度を指定
        GeoPoint GP = new GeoPoint(latitude, longitude);
        //現在地までアニメーションで移動
        MapCtrl.animateTo(GP);
        //現在地までパッと移動
        MapCtrl.setCenter(GP);
        }else{
        //現在地情報取得失敗時の処理
{'fraction_non_alphanumeric': 0.10546173194394538, 'fraction_numerical': 0.01221703197987783, 'mean_word_length': 3.1421130952380953, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2145152', 'n_tokens_mistral': 1849, 'n_tokens_neox': 1752, 'n_words': 276}