/// <summary> /// Populates current list of features on map and associates icon with each /// </summary> private void KML_WorkCompleted() { string icon; Marker marker; UIImage iconimage; this.InvokeOnMainThread(() => { mapView.Clear(); if (features != null) // may be null if invalid map url { foreach (Feature feature in features.features) { icon = feature.properties.iconurl; icon = icon.Substring(icon.LastIndexOf("/") + 1); marker = new Marker(); marker.Position = new CLLocationCoordinate2D(feature.geometry.coordinates[1], feature.geometry.coordinates[0]); marker.Title = feature.properties.title; iconimage = _mapIconManager.GetImageForIconName(icon); if (iconimage != null) { marker.Icon = iconimage; } marker.Map = mapView; } } // reset interval since it may have changed since the last time this was run _bgWorkerWrapper_MapFeatures.SetInterval(_watchTowerSettings.UpdateInterval); }); }
void PostLocationCompleted() { _bgWorkerWrapper.SetInterval(_watchTowerSettings.UpdateInterval); }