Skip to content
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

[Sample Prototype] Snap Geometry Edits #178

Closed
wants to merge 91 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
4d3e86b
Release v200.3.0 (#141)
shubham7109 Dec 6, 2023
781d298
Update sample to composable mapview
prupani-7 Dec 7, 2023
031e3c8
Update sample to composable mapview
prupani-7 Dec 7, 2023
88e2488
Update sample to composable mapview
prupani-7 Dec 7, 2023
1d1fbbe
refcator
prupani-7 Dec 7, 2023
385df38
feedback
prupani-7 Dec 12, 2023
509d98e
feedback
prupani-7 Dec 12, 2023
5154942
readme
prupani-7 Dec 12, 2023
370b484
update json file
prupani-7 Dec 13, 2023
4e30a73
Update metadata script checker (#153)
shubham7109 Dec 13, 2023
5aacc2d
Merge branch 'main' into feature-branch/geo-compose
shubham7109 Dec 13, 2023
b0f65e8
Release v200.3.0 (#141)
shubham7109 Dec 6, 2023
eff28ae
Update metadata script checker (#153)
shubham7109 Dec 13, 2023
43df0b4
fix
prupani-7 Dec 13, 2023
5b14a39
Merge branch 'feature-branch/geo-compose' into pri/updateShowMagnifie…
prupani-7 Dec 13, 2023
36630d3
version changes
prupani-7 Dec 13, 2023
b1e321c
checker
prupani-7 Dec 13, 2023
f19b6f6
update new module script to use geo-compose toolkit component (#148)
prupani-7 Dec 14, 2023
1547363
update show magnifier sample (#149)
prupani-7 Dec 15, 2023
2eb7d79
Samples Post Release Tasks (#150)
shubham7109 Dec 14, 2023
1e99446
add back compose-bom version
prupani-7 Dec 15, 2023
38e74db
arcgisToolkitVersion 200.3.0-1 for toolkit geo-compose
prupani-7 Dec 15, 2023
be4d4a8
update sample
ruiqima Dec 18, 2023
6fbb00c
Merge branch 'feature-branch/geo-compose' into rui/updateManageOperat…
ruiqima Dec 18, 2023
a593aab
update sample
ruiqima Dec 18, 2023
cd958b4
Priy/update show coordinates sample (#152)
prupani-7 Dec 18, 2023
6be53f9
Merge branch 'feature-branch/geo-compose' into rui/updateManageOperat…
ruiqima Dec 19, 2023
ae9759b
update sample
ruiqima Dec 19, 2023
028da0f
update sample
ruiqima Dec 19, 2023
13ff83b
update sample
ruiqima Dec 20, 2023
75c87de
update sample
ruiqima Dec 20, 2023
aef4a33
update sample
ruiqima Dec 20, 2023
ec31807
Rui/update manage operational layers sample (#157)
ruiqima Dec 20, 2023
def15bb
update sample
ruiqima Dec 20, 2023
216bf77
update sample
ruiqima Dec 20, 2023
4da1795
update sample
ruiqima Dec 20, 2023
2f2460b
update sample
ruiqima Dec 21, 2023
4bd0098
update sample
ruiqima Dec 21, 2023
c2e7d75
Update sample: Identify layer features (#159)
ruiqima Dec 22, 2023
911a6d6
Update sample - query feature table (#160)
prupani-7 Dec 23, 2023
304ab4a
update sample
ruiqima Dec 20, 2023
b9b3063
update sample
ruiqima Dec 22, 2023
d0170ff
update sample
ruiqima Dec 22, 2023
91df744
update sample
ruiqima Dec 27, 2023
2e3bb9b
update sample, address some comments
ruiqima Dec 28, 2023
8119c0f
merge to feature-branch/geo-compose
ruiqima Dec 28, 2023
28ae7c4
Update sample - Display points using feature reduction (#158)
prupani-7 Dec 28, 2023
e036ee7
Update sample - add dynamic entity sample (#161)
prupani-7 Dec 29, 2023
6388669
update sample to reflect changes from holistic event
ruiqima Mar 4, 2024
ad7f3f9
update sample to reflect changes in toolkit
ruiqima Mar 4, 2024
4f5611d
reflect changes
ruiqima Mar 5, 2024
7ce7675
update to use Kotlin DSL
ruiqima Mar 5, 2024
93213bb
reorder libraries in toml file
ruiqima Mar 5, 2024
7079558
Merge v.next into feature branch to use kotlin DSL (#172)
ruiqima Mar 5, 2024
b224713
Merge branch 'feature-branch/geo-compose' into ruiqi/update-display-c…
ruiqima Mar 5, 2024
8f817dc
Merge branch 'feature-branch/geo-compose' into ruiqi/update-show-magn…
ruiqima Mar 5, 2024
38cd9f8
Merge branch 'feature-branch/geo-compose' into ruiqi/revisit-show-coo…
ruiqima Mar 5, 2024
e587a6b
update metatdata.json file
ruiqima Mar 6, 2024
963c7bf
remove trailing spaces
ruiqima Mar 6, 2024
40a5c68
Update README.md
ruiqima Mar 6, 2024
98e4a80
Update README.metadata.json
ruiqima Mar 6, 2024
9aad70d
resolve style checker
ruiqima Mar 6, 2024
dd42f3b
update samples to reflect toolkit changes
ruiqima Mar 6, 2024
480ad05
revert README style checker error changes
ruiqima Mar 6, 2024
4193ae6
Update display composable mapview sample (#168)
ruiqima Mar 6, 2024
e5e2e5c
reflect changes in toolkit
ruiqima Mar 7, 2024
d2df7d1
Update show magnifier sample (#169)
ruiqima Mar 7, 2024
4c30012
Update MapViewModel.kt
ruiqima Mar 7, 2024
fd159ff
Update MapViewModel.kt
ruiqima Mar 7, 2024
b5e0c8a
reflect changes in toolkit
ruiqima Mar 7, 2024
da2dbfa
Update Add Dynamic Entity Layer sample (#173)
prupani-7 Mar 8, 2024
b24cb02
Update analyze hotspots (#176)
prupani-7 Mar 8, 2024
8076d65
Update Feature clustering sample (#180)
prupani-7 Mar 11, 2024
af0745a
Update manage operational layers sample (#175)
ruiqima Mar 11, 2024
0535683
resolve comments
ruiqima Mar 11, 2024
a92b761
Revisit Identify layer features sample (#177)
ruiqima Mar 11, 2024
f7f3855
resolve comments
ruiqima Mar 11, 2024
ac17144
Update show coordinated in multiple formats sample (#174)
ruiqima Mar 11, 2024
c4bfb00
resolve comments
ruiqima Mar 15, 2024
18f2f67
Revisit query feature table sample (#181)
ruiqima Mar 19, 2024
aedbfe5
reflect toolkit changes
ruiqima Mar 20, 2024
efc00f6
Rename geo-compose -> geoview-compose (#182)
prupani-7 Mar 21, 2024
c0825dc
Merge branch 'feature-branch/geo-compose' into ruiqi/update-new-modul…
ruiqima Mar 21, 2024
bda53b5
update jar file
ruiqima Mar 21, 2024
9eec9ba
Update NewModuleScript (#183)
ruiqima Mar 25, 2024
c1915fe
update png remove the license string
prupani-7 Mar 25, 2024
55190ae
Other files
Luiy0 Mar 8, 2024
f1f1265
Main sample files
Luiy0 Mar 8, 2024
234c813
geocompose -> geoviewcompose
Luiy0 Mar 26, 2024
e777d31
Data re-work
Luiy0 Apr 2, 2024
3702783
Update MapViewModel.kt
Luiy0 Apr 3, 2024
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
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches:
- main
- v.next
- feature-branch/geo-compose

# A workflow run is made up of one or more jobs that can run sequentially or
# in parallel.
Expand Down
3 changes: 2 additions & 1 deletion add-dynamic-entity-layer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ This sample uses a [stream service](https://realtimegis2016.esri.com:6443/arcgis

## Additional information

This sample uses the GeoViewCompose Toolkit module to be able to implement a Composable MapView.
More information about dynamic entities can be found in the [guide documentation](https://developers.arcgis.com/kotlin/real-time/work-with-dynamic-entities/).

## Tags

data, dynamic, entity, live, purge, real-time, service, stream, track
data, dynamic, entity, geoviewcompose, live, purge, real-time, service, stream, toolkit, track
3 changes: 2 additions & 1 deletion add-dynamic-entity-layer/README.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
"data",
"dynamic",
"entity",
"geoviewcompose",
"live",
"purge",
"real-time",
"service",
"stream",
"toolkit",
"track",
"ArcGISStreamService",
"DynamicEntity",
Expand All @@ -36,7 +38,6 @@
"snippets": [
"src/main/java/com/esri/arcgismaps/sample/adddynamicentitylayer/MainActivity.kt",
"src/main/java/com/esri/arcgismaps/sample/adddynamicentitylayer/components/BottomSheetContent.kt",
"src/main/java/com/esri/arcgismaps/sample/adddynamicentitylayer/components/ComposeMapView.kt",
"src/main/java/com/esri/arcgismaps/sample/adddynamicentitylayer/components/MapViewModel.kt",
"src/main/java/com/esri/arcgismaps/sample/adddynamicentitylayer/screens/MainScreen.kt"
],
Expand Down
3 changes: 3 additions & 0 deletions add-dynamic-entity-layer/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,7 @@ dependencies {
implementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(project(":samples-lib"))
// Toolkit dependencies
implementation(platform(libs.arcgis.maps.kotlin.toolkit.bom))
implementation(libs.arcgis.maps.kotlin.toolkit.geoview.compose)
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ class MainActivity : ComponentActivity() {
color = MaterialTheme.colorScheme.background
) {
MainScreen(
sampleName = getString(R.string.app_name),
application = application
sampleName = getString(R.string.app_name)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ fun DynamicEntityLayerProperties(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween
) {

Text(
text = "Previous Observations",
style = SampleTypography.bodyLarge
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.esri.arcgismaps.sample.adddynamicentitylayer.components

import android.app.Application
import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.lifecycle.AndroidViewModel
import com.arcgismaps.mapping.ArcGISMap
Expand All @@ -27,7 +28,6 @@ import com.arcgismaps.realtime.ArcGISStreamService
import com.arcgismaps.realtime.ArcGISStreamServiceFilter
import com.esri.arcgismaps.sample.adddynamicentitylayer.R
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.launch

class MapViewModel(
Expand All @@ -38,14 +38,11 @@ class MapViewModel(
// set the state of the switches and slider
val trackLineCheckedState = mutableStateOf(false)
val prevObservationCheckedState = mutableStateOf(false)
val trackSliderValue = mutableStateOf(5f)
val trackSliderValue = mutableFloatStateOf(5f)

// flag to show or dismiss the bottom sheet
val isBottomSheetVisible = mutableStateOf(false)

// set the MapView mutable stateflow
val mapViewState = MutableStateFlow(MapViewState())

// create ArcGIS Stream Service
private val streamService =
ArcGISStreamService(application.getString(R.string.stream_service_url))
Expand All @@ -56,6 +53,11 @@ class MapViewModel(
// layer displaying the dynamic entities on the map
private val dynamicEntityLayer: DynamicEntityLayer

// define ArcGIS map using Streets basemap
val map = ArcGISMap(BasemapStyle.ArcGISStreets).apply {
initialViewpoint = Viewpoint(40.559691, -111.869001, 150000.0)
}

/**
* set the data source for the dynamic entity layer.
*/
Expand All @@ -70,7 +72,7 @@ class MapViewModel(
dynamicEntityLayer = DynamicEntityLayer(streamService)

// add the dynamic entity layer to the map's operational layers
mapViewState.value.arcGISMap.operationalLayers.add(dynamicEntityLayer)
map.operationalLayers.add(dynamicEntityLayer)
}

// disconnects the stream service
Expand Down Expand Up @@ -125,10 +127,3 @@ class MapViewModel(
}
}

/**
* Data class that represents the MapView state
*/
data class MapViewState(
var arcGISMap: ArcGISMap = ArcGISMap(BasemapStyle.ArcGISStreets),
var viewpoint: Viewpoint = Viewpoint(40.559691, -111.869001, 150000.0)
)
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.dp
import com.esri.arcgismaps.sample.adddynamicentitylayer.components.ComposeMapView
import com.arcgismaps.toolkit.geoviewcompose.MapView
import com.esri.arcgismaps.sample.adddynamicentitylayer.components.DynamicEntityLayerProperties
import com.esri.arcgismaps.sample.adddynamicentitylayer.components.MapViewModel
import com.esri.arcgismaps.sample.sampleslib.components.BottomSheet
Expand All @@ -45,9 +46,11 @@ import com.esri.arcgismaps.sample.sampleslib.components.SampleTopAppBar
* Main screen layout for the sample app
*/
@Composable
fun MainScreen(sampleName: String, application: Application) {
fun MainScreen(sampleName: String) {
/// coroutineScope that will be cancelled when this call leaves the composition
val sampleCoroutineScope = rememberCoroutineScope()
// get the application context
val application = LocalContext.current.applicationContext as Application

// create a ViewModel to handle MapView interactions
val mapViewModel = remember { MapViewModel(application, sampleCoroutineScope) }
Expand All @@ -64,11 +67,13 @@ fun MainScreen(sampleName: String, application: Application) {
.padding(it)
) {
// composable function that wraps the MapView
ComposeMapView(
MapView(
modifier = Modifier
.fillMaxSize()
.weight(1f),
mapViewModel = mapViewModel
arcGISMap = mapViewModel.map,
onSingleTapConfirmed = { mapViewModel.dismissBottomSheet() },
onPan = { mapViewModel.dismissBottomSheet() }
)
Row(
modifier = Modifier
Expand Down
6 changes: 5 additions & 1 deletion analyze-hotspots/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ Tap on Analyze, and select a date from the "FROM" DatePicker and "TO" DatePicker
* GeoprocessingResult
* GeoprocessingTask

## Additional information

This sample uses the GeoViewCompose Toolkit module to be able to implement a Composable MapView.

## Tags

analysis, density, geoprocessing, hot spots, hotspots
analysis, density, geoprocessing, geoviewcompose, hot spots, hotspots, toolkit
3 changes: 2 additions & 1 deletion analyze-hotspots/README.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
"analysis",
"density",
"geoprocessing",
"geoviewcompose",
"hot spots",
"hotspots",
"toolkit",
"GeoprocessingJob",
"GeoprocessingParameters",
"GeoprocessingResult",
Expand All @@ -27,7 +29,6 @@
],
"snippets": [
"src/main/java/com/esri/arcgismaps/sample/analyzehotspots/MainActivity.kt",
"src/main/java/com/esri/arcgismaps/sample/analyzehotspots/components/ComposeMapView.kt",
"src/main/java/com/esri/arcgismaps/sample/analyzehotspots/components/MapViewModel.kt",
"src/main/java/com/esri/arcgismaps/sample/analyzehotspots/screens/BottomAppContent.kt",
"src/main/java/com/esri/arcgismaps/sample/analyzehotspots/screens/BottomSheetScreen.kt",
Expand Down
3 changes: 3 additions & 0 deletions analyze-hotspots/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,7 @@ dependencies {
implementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(project(":samples-lib"))
// Toolkit dependencies
implementation(platform(libs.arcgis.maps.kotlin.toolkit.bom))
implementation(libs.arcgis.maps.kotlin.toolkit.geoview.compose)
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ class MainActivity : ComponentActivity() {
color = MaterialTheme.colorScheme.background
) {
MainScreen(
sampleName = getString(R.string.app_name),
application = application
sampleName = getString(R.string.app_name)
)
}
}
Expand Down

This file was deleted.

Loading