public void RemoveAllOverlay() { lock ("RenderAccess") { for (int i = 0; i < m_iGpsPOIIndex; i++) { if (m_gpsPOI[i] != null) { Remove(m_gpsPOI[i]); m_gpsPOI[i].Dispose(); m_gpsPOI[i] = null; } } Plugin.pluginResetPOIs(); for (int i = 0; i < m_iGpsIconIndex; i++) { if (m_gpsIcons[i] != null) { Remove(m_gpsIcons[i]); m_gpsIcons[i].Dispose(); m_gpsIcons[i] = null; } } for (int i = 0; i < m_uTrackResize; i++) { if (m_gpsTrack[i] != null) { Remove(m_gpsTrack[i]); m_gpsTrack[i].Dispose(); m_gpsTrack[i] = null; } } m_iGpsPOIIndex = 0; m_iGpsIconIndex = 0; for (int i = 0; i < m_iGpsGeoFenceIndex; i++) { if (m_gpsGeoFence[i] != null) { Remove(m_gpsGeoFence[i]); m_gpsGeoFence[i].Dispose(); m_gpsGeoFence[i] = null; } } m_iGpsGeoFenceIndex = 0; if (gpsTrackerInfo != null) { Remove(gpsTrackerInfo); gpsTrackerInfo.Dispose(); gpsTrackerInfo = null; } } }
public void ShowFixInfo(string sText) { if (gpsTrackerInfo==null) { gpsTrackerInfo = new GPSTrackerFixInfo(); gpsTrackerInfo.Initialize(this.drawArgs); Add(gpsTrackerInfo); } gpsTrackerInfo.ShowFixInfo(sText); Update(this.drawArgs); }
public GPSTrackerOverlay(GpsTrackerPlugin plugin) : base("GPSTracker") { this.Plugin = plugin; ParentApplication = plugin.ParentApplication; // //Set an original size for the arrays m_uIconResize=1; m_uPOIResize=1; m_uTrackResize=1; m_uGeoFenceResize = 1; m_gpsIcons = new GPSIcon[m_uIconResize]; m_gpsPOI = new GPSIcon[m_uPOIResize]; m_gpsTrack = new GPSTrackLine[m_uTrackResize]; m_gpsGeoFence = new GPSGeoFence[m_uGeoFenceResize]; gpsTrackerInfo=null; m_iGpsPOIIndex=0; m_iGpsIconIndex=0; m_iGpsGeoFenceIndex = 0; // true to make this layer active on startup, this is equal to the checked state in layer manager IsOn = false; }