Commit 1b6acdf8 authored by Maxim Safronov's avatar Maxim Safronov
Browse files

Innitial Commit

parent d1766e22
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
    <output url="file://$PROJECT_DIR$/build/classes" />
  </component>
  <component name="ProjectType">
+19 −1
Original line number Diff line number Diff line
@@ -17,13 +17,31 @@ android {
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        targetCompatibility = 1.8
        sourceCompatibility = 1.8
    }
}

repositories {
    maven {
        url "http://maven.google.com/"
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    testImplementation 'junit:junit:4.13'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    // Основная библиотека MapKit.
    implementation 'com.yandex.android:mapkit:3.4.0'
    // Дополнительные модули MapKit.
    // Удалите зависимости если ваше приложение не использует их.
    implementation 'com.yandex.android:directions:3.4.0'
    implementation 'com.yandex.android:places:3.4.0'
    implementation 'com.yandex.android:search:3.4.0'
    implementation 'com.yandex.android:transport:3.4.0'
}
+14 −0
Original line number Diff line number Diff line
@@ -5,9 +5,23 @@ import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    private MapView mapview;

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

        MapKitFactory.setApiKey("6385dca0-e464-4359-b337-e62a44ebfa70");
        MapKitFactory.initialize(this);

        // Укажите имя activity вместо map.
        setContentView(R.layout.MainActivity);
        mapview = (MapView)findViewById(R.id.mapview);
        mapview.getMap().move(
                new CameraPosition(new Point(55.751574, 37.573856), 11.0f, 0.0f, 0.0f),
                new Animation(Animation.Type.SMOOTH, 0),
                null);

        setContentView(R.layout.activity_main);
    }
}
+7 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <TextView
    <!--<TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"
@@ -15,5 +15,11 @@
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
        -->

    <com.yandex.mapkit.mapview.MapView
        android:id="@+id/mapview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ buildscript {
    repositories {
        google()
        jcenter()
        mavenCentral()

    }
    dependencies {