private void AddStopToMap(Stop stop) { PinViewModel pin = new PinViewModel(stop) { IsFav = App.ViewModel.Favourites.Contains(stop.stop_id) }; App.ViewModel.Pins.Add(pin); if (stopsOnMap.ContainsKey(stop.stop_id)) { stopsOnMap[stop.stop_id] = stop; } else { stopsOnMap.Add(stop.stop_id, stop); } }
public static Stop readStopLine(string line) { var split = ((String)line).Split(','); if (split.Length != 6) { return null; } Stop retStop = new Stop() { stop_lat = double.Parse(split[0]), zone_id = tryParseLong(split[1]), stop_lon = double.Parse(split[2]), stop_id = tryParseLong(split[3]), stop_name = split[4], location_type = tryParseInt(split[5]) }; return retStop; }
public PinViewModel(Stop stop) { pinStop = stop; }