POST
|
Using: Arcgis Maps SDK for Kotlin - 200.1 - April 19, 2023 I mainly followed the samples for 200.1, when first opening the activity containing the MapView it runs well, requests the user location and when granted pans to the user location. When the user leaves the activity and reopens it the map is zoomed out to the max extent (world map) and takes around 5 secs to retrieve the user's location and pan to it. However this doesn't happen everytime, but most of the time. The first time running the activity is always fine. This is mainly problematic because the user may start panning around and then the MapView won't pan to their location automatically. Also I dind't find a way to check when the Map View finished panning to the user's location so that I could add a loading overlay. I've tried it on 3 different devices (Samsung, Xiaomi and ZTE) and always get the same result. I'll leave below an attachment. Heres my setupMap funtion: private fun setupMap() { // create a map with the BasemapStyle Topographic val map = ArcGISMap(BasemapStyle.ArcGISTopographic) // set the map to be displayed in the layout's MapView mapView.map = map // LocationProvider requires an Android Context to properly interact with Android system ArcGISEnvironment.applicationContext = applicationContext // set the autoPanMode locationDisplay.setAutoPanMode(LocationDisplayAutoPanMode.Recenter) lifecycleScope.launch { // start the map view's location display locationDisplay.dataSource.start() .onFailure { // check permissions to see if failure may be due to lack of permissions requestPermissions() mapView.setViewpoint( Viewpoint( defaultViewLat, defaultViewLong, defaultViewScale ) ) } .onSuccess { locationDisplay.setAutoPanMode(LocationDisplayAutoPanMode.Recenter) } } } And here's my onCreate function: override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_occ_create_info) ... lifecycle.addObserver(mapView) setApiKey() setupMap() ... }
... View more
06-26-2023
04:25 AM
|
0
|
0
|
370
|
POST
|
Hi @Mandy_Li , thanks for the quick response. Build 1.15.146 solves the problem we were having. Thanks again!
... View more
09-19-2022
12:33 AM
|
0
|
0
|
404
|
POST
|
Up to version 1.15.108 I was able to use location sharing in my Portal, version 10.9.1, but from that version it gives me the message “Your account is not licensed for location sharing”
... View more
09-16-2022
02:03 AM
|
0
|
2
|
579
|
IDEA
|
Order results from Related Records on Popup is different from results of attribute table. If possible, maintain order results.
... View more
04-06-2018
07:08 AM
|
0
|
0
|
216
|
IDEA
|
Enable scan RFID/NFC to enable tag reader to input asset ID like QR code and barcode
... View more
06-11-2017
02:14 PM
|
26
|
5
|
2479
|
BLOG
|
Hi, James, You can illustrate how I can configure a configuration file with parameters to automate easier synchronization tasks. I just need to see an exemple.
... View more
04-12-2017
09:26 AM
|
0
|
0
|
16756
|
Title | Kudos | Posted |
---|---|---|
26 | 06-11-2017 02:14 PM |
Online Status |
Offline
|
Date Last Visited |
2 weeks ago
|