mallpopla.blogg.se

How to rotate map in pharaoh game
How to rotate map in pharaoh game














I also tried calling SetMapListeners only once in the lifecycle, the first time OnMapReady is called, but that did not change anything. Log.Debug("MyApp / Map", "Camera move started.") Īs you can see in the following log excerpt, the listeners do work in the beginning, but once the device is rotated (at least) once, they are gone. Public void OnCameraMoveStarted(int reason) Log.Debug("MyApp / Map", "Camera is idle.") Log.Debug("MyApp / Map", "Map is ready!") Public void OnMapReady(GoogleMap googleMap) Protected override void OnCreate(Bundle savedInstanceState) _map.SetOnCameraMoveStartedListener(this) Log.Debug("MyApp/ Map", "SetMapListeners")

how to rotate map in pharaoh game

Tx.Add(Resource.Id.map_placeholder, _mapFragment) Var tx = FragmentManager.BeginTransaction() _mapFragment = MapFragment.NewInstance() GoogleMap.IOnCameraIdleListener, GoogleMap.IOnCameraMoveStartedListener Everything else (actual drawing) is removed: public class MapActivity : Activity, IOnMapRead圜allback, This is the bare code, only map creation and handling. I (the app) just can't work with it anymore. The map works, however - I (the user) can still move the camera just fine. As soon as the device is rotated (portrait -> landscape OR vice versa), the camera movement does not trigger the listeners any more. They work fine, but only in the beginning. I am fetching the GoogleMap in OnResume via GetMapAsync and binding the listeners in OnMapReady. The MapFragment is generated programmatically in OnCreate. It displays as map and draws PolyLines, doing so in OnCameraIdle().

#How to rotate map in pharaoh game android

I am developing an Android app with Xamarin (version 7.1).














How to rotate map in pharaoh game