Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
prupani-7 committed Dec 18, 2023
1 parent 85acc1b commit 7d29c43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.esri.arcgismaps.sample.showcoordinatesinmultipleformats

import android.app.Application
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
Expand Down Expand Up @@ -49,9 +48,7 @@ class MainActivity : ComponentActivity() {
@Composable
private fun ShowCoordinatesInMultipleFormatsApp() {
Surface(color = MaterialTheme.colorScheme.background) {
MainScreen(sampleName = getString(R.string.app_name),
application = application
)
MainScreen(sampleName = getString(R.string.app_name))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

package com.esri.arcgismaps.sample.showcoordinatesinmultipleformats.screens

import android.app.Application
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Scaffold
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.lifecycle.viewmodel.compose.viewModel
import com.arcgismaps.Color
import com.arcgismaps.geometry.Point
Expand All @@ -46,15 +46,15 @@ import com.esri.arcgismaps.sample.showcoordinatesinmultipleformats.components.Ma
* Main screen layout for the sample app
*/
@Composable
fun MainScreen(sampleName: String, application: Application) {
fun MainScreen(sampleName: String) {
// create a ViewModel to handle MapView interactions
val mapViewModel: MapViewModel = viewModel()
// create a map that has the WGS 84 coordinate system and set this into the map
val basemapLayer = ArcGISTiledLayer(application.getString(R.string.basemap_url))
val basemapLayer = ArcGISTiledLayer(LocalContext.current.applicationContext.getString(R.string.basemap_url))
val arcGISMap = ArcGISMap(Basemap(basemapLayer))
// the collection of graphics overlays used by the MapView
val graphicsOverlayCollection = rememberGraphicsOverlayCollection()
// the collection of graphics overlays used by the MapView
// graphics overlay for the MapView to draw the graphics
val graphicsOverlay = remember { GraphicsOverlay() }
// set up a graphic to indicate where the coordinates relate to, with an initial location
val initialPoint = Point(0.0, 0.0, SpatialReference.wgs84())
Expand All @@ -74,7 +74,7 @@ fun MainScreen(sampleName: String, application: Application) {

Scaffold(
topBar = { SampleTopAppBar(title = sampleName) },
content = { it ->
content = {
Column(
modifier = Modifier
.fillMaxSize()
Expand Down

0 comments on commit 7d29c43

Please sign in to comment.