Last active
September 21, 2020 07:30
-
-
Save ljcamargo/1b4a5dcce32a0e12999e6da57f1ea143 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.company.maps | |
| import android.os.Bundle | |
| import android.widget.Toast | |
| import androidx.appcompat.app.AppCompatActivity | |
| class MapsActivity : AppCompatActivity() { | |
| private lateinit var map: AgnosticMap | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_maps) | |
| map = AgnosticMap().apply { | |
| startMap( | |
| activity = this@MapsActivity, | |
| fragmentId = R.id.map, | |
| latitude = 19.4326, | |
| longitude = -99.1332, | |
| zoom = 14f, | |
| marker = true | |
| ) { | |
| // Map is Ready | |
| setOnMapClickListener { | |
| Toast.makeText(this@MapsActivity, "Map Clicked", Toast.LENGTH_LONG).show() | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment