Skip to content

[Patch] Create and save map #237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,26 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
import androidx.lifecycle.viewmodel.compose.viewModel

import com.arcgismaps.ArcGISEnvironment
import com.esri.arcgismaps.sample.sampleslib.theme.SampleAppTheme
import com.esri.arcgismaps.sample.createandsavemap.screens.MainScreen
import com.arcgismaps.toolkit.authentication.DialogAuthenticator
import com.arcgismaps.toolkit.authentication.signOut
import com.esri.arcgismaps.sample.createandsavemap.components.MapViewModel
import kotlinx.coroutines.runBlocking

class MainActivity : ComponentActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// This sample uses an ArcGIS Online login to be able to save a map as an ArcGIS portal item
// No need for license strings or an API key
ArcGISEnvironment.apiKey = null

// Sign out of any portals which are already authenticated
runBlocking {
ArcGISEnvironment.authenticationManager.signOut()
}
setContent {
SampleAppTheme {
SampleApp()
Expand Down
Loading