async void Map_InfoWindowLongClick(object sender, InfoWindowLongClickEventArgs e) { var marker = e.Marker; var markerTag = marker.Tag.ToString().Split(':'); var t = markerTag[0]; var id = markerTag[1]; if (t == "poke") { var poke = ServiceLayer.SharedInstance.Pokemon[id]; marker.HideInfoWindow(); if (settings.PokemonTrash.Where(p => p == poke.pokemon_id).Count() == 0) { settings.PokemonTrash.Add(poke.pokemon_id); } UpdateMapPokemon(true); await ServiceLayer.SharedInstance.SaveSettings(); } }
private void GoogleMap_InfoWindowLongClick(object sender, InfoWindowLongClickEventArgs e) { NOTAMZone notamZone = new NOTAMZone(); string hash = $"{e.Marker.Position.Latitude}{e.Marker.Position.Longitude}"; for (int i = 0; i < hashes.Length; i++) { if (hash == hashes[i]) { notamZone = airspace.NOTAMZones[i]; break; } } Intent intent = new Intent(this.ApplicationContext, typeof(InfoActivity)); string notamZoneJson = JsonConvert.SerializeObject(notamZone); intent.PutExtra("airspaceInfo", notamZoneJson); intent.PutExtra("airspaceType", typeof(NOTAMZone).ToString()); StartActivity(intent); }