Esempio n. 1
0
        public override void Unregister(Android.Gms.Maps.GoogleMap nativeMap, Map map)
        {
            if (nativeMap != null)
            {
                NativeMap.CameraIdle -= NativeMapOnCameraIdle;
                NativeMap.SetOnMarkerClickListener(null);
                NativeMap.SetOnInfoWindowClickListener(null);

                clusterHandler.Dispose();
                clusterManager.Dispose();
            }

            base.Unregister(nativeMap, map);
        }
Esempio n. 2
0
        internal override void Unregister(GoogleMap nativeMap, Map map)
        {
            if (nativeMap != null)
            {
                NativeMap.CameraIdle -= NativeMapOnCameraIdle;
                NativeMap.SetOnMarkerClickListener(null);
                NativeMap.SetOnInfoWindowClickListener(null);
                nativeMap.MarkerDrag      -= OnMarkerDrag;
                nativeMap.MarkerDragEnd   -= OnMarkerDragEnd;
                nativeMap.MarkerDragStart -= OnMarkerDragStart;

                clusterHandler.Dispose();
                clusterManager.Dispose();
            }

            base.Unregister(nativeMap, map);
        }
Esempio n. 3
0
 public void Dispose()
 {
     if (ClientManager != null)
     {
         ClientManager.Dispose();
     }
     if (ClusterManager != null)
     {
         ClusterManager.Dispose();
     }
     if (this.m_ClusterConnector != null)
     {
         this.m_ClusterConnector.Dispose();
     }
     if (this.m_ClientSocket != null)
     {
         this.m_ClientSocket.Dispose();
     }
 }
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (disposing)
            {
                markerSubscription.Clear();

                clusterManager?.Dispose();
                clusterManager = null;

                googleMap?.Dispose();
                googleMap = null;

                foreach (var item in renderedMarkers)
                {
                    item.Value.Dispose();
                }

                renderedMarkers.Clear();
            }
        }