Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
sdk
 
 
 
 
 
 
 
 
 
 

Map4D SDK

Map4D SDK for Android, written in C++, Java.

CocoaPods

Installation

Use Gradle

dependencies {
    implementation 'vn.map4d:Map4dTypes:1.0.6'
    implementation 'vn.map4d:Map4dMap:1.5.0'
}

Use Maven

<dependency>
	<groupId>vn.map4d</groupId>
	<artifactId>Map4dMap</artifactId>
	<version>1.5.0</version>
	<type>pom</type>
</dependency>

Using

  1. Provide access key
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="vn.map4d.simplemap">
    <application
        android:theme="@style/AppTheme">

        <meta-data
            android:name="vn.map4d.map.ACCESS_KEY"
            android:value="TYPE_YOUR_KEY_HERE"/>

    </application>

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
</manifest>
  1. Create layout
<vn.map4d.map.core.MFMapView
        android:id="@+id/mapView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        />
  1. Working with map view (kotlin)
import vn.map4d.map.core.Map4D
import vn.map4d.map.core.OnMapReadyCallback

class MainActivity : AppCompatActivity(), OnMapReadyCallback {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        mapView.getMapAsync(this)
    }

    override fun onMapReady(map4D: Map4D?) {
        map4D?.enable3DMode(true)
        //TODO
    }
    
     override fun onDestroy() {
        map4D?.onDestroy()
        super.onDestroy()
     }
}

Document References

https://docs.map4d.vn/map4d-android-sdk

License

Copyright (C) 2021 IOT Link Ltd. All Rights Reserved.