private void Display3D(ObjectData mmo) { logger.Debug("Displaying AR style! " + mmo.Id); var scrn = Instantiate(ScreenPrefab); var mmoContainer = scrn.AddComponent <MMOContainer>(); var textured = scrn.GetComponentInChildren <WebTextured>(); if (textured == null) { textured = scrn.AddComponent <WebTextured>(); } textured.url = TemporaryCompatUtils.GetImageUrl(mmo); // Too high res? //textured.url = CineastUtils.GetThumbnailUrl(mmo); textured.LoadImageFromWeb(); mmoContainer.MultimediaObject = mmo; var geoposed = scrn.AddComponent <GeoPositioned>(); var lat = MetadataUtils.GetLatitude(mmo.Metadata); var lon = MetadataUtils.GetLongitude(mmo.Metadata); var bearing = MetadataUtils.GetBearing(mmo.Metadata); geoposed.GeoCoordinates = new GeoArithmetic.GeoCoordinates(lat, lon); geoposed.Bearing = (float)bearing; arMapper.AddGeoPositioned(geoposed); ActiveScreens.Add(scrn); }
public void parseToPictureData(List <ObjectData> list, List <POICoordinatesObject> poilist) { List <ObjectData> newList = list; if (poilist.Count != 0) { newList = FilterToDistance(list, poilist); } pictureDataList = new List <PictureData>(); int id = 0; string url; string time; double lat = 0; double lon = 0; float hea; foreach (var VARIABLE in newList) { url = CineastWrapper.GetMediaUrlOf(VARIABLE); time = MetadataUtils.GetDateTime(VARIABLE.Metadata); lat = MetadataUtils.GetLatitude(VARIABLE.Metadata); lon = MetadataUtils.GetLongitude(VARIABLE.Metadata); hea = Convert.ToSingle(MetadataUtils.GetBearing(VARIABLE.Metadata)); hea = 0; Debug.Log("GET URLS " + url); Debug.Log("THESE ARE TIME: " + time); if (url == "http://10.34.58.145/objects/Ans_05459-007-AL-FL.jpg") { hea = 160; } if (url == "http://10.34.58.145/objects/barfuesserplatz-parkplatz-lohnhof.png") { hea = 90; } if (url == "http://10.34.58.145/objects/barfuesserplatz-kohlenberg.png") { hea = 90; } if (url == "http://10.34.58.145/objects/Fel_008898-RE.jpg.png") { hea = 90; } if (url == "http://10.34.58.145/objects/Com_M06-0079-0004.jpg") { hea = 270; } if (url == "http://10.34.58.145/objects/barfuesserplatz-lohnhof-schnee.png") { hea = 90; } if (url == "http://10.34.58.145/objects/Ans_05395-02-001.jpg") { hea = 270; } if (url == "http://10.34.58.145/objects/Ans_05395-01-016.jpg") { hea = 0; } if (url == "http://10.34.58.145/objects/Barfuesserirche_ganz.jpg") { hea = 180; } if (url == "http://10.34.58.145/objects/Dia_287-01946.jpg") { hea = 300; } if (url == "http://10.34.58.145/objects/Ans_05395-01-003.jpg") { hea = 0; } if (url == "http://10.34.58.145/objects/Basel_2012-08_Mattes_1_(206).JPG") { hea = 90; } if (url == "http://10.34.58.145/objects/Ans_02112.jpg") { hea = 240; } if (url == "http://10.34.58.145/objects/Com_M06-0079-0002.jpg") { hea = 290; } if (url == "http://10.34.58.145/objects/Ans_05395-01-001.jpg") { hea = 200; } //Temporary fix if (time != "" && activate_temp) { DateTime dateTime = DateTime.Parse(MetadataUtils.GetDateTime(VARIABLE.Metadata)); if (lowerbound < dateTime && dateTime < upperbound) { Debug.Log("TIME DEBUG: " + MetadataUtils.GetDateTime(VARIABLE.Metadata) + " CURRENT: LOWER " + lowerbound + " UP " + upperbound); pictureDataList.Add(new PictureData(id, url, lat, lon, hea, time)); FetchedList.Add(new PictureData(id, url, lat, lon, hea, time)); } else { continue; } } else { pictureDataList.Add(new PictureData(id, url, lat, lon, hea, time)); FetchedList.Add(new PictureData(id, url, lat, lon, hea, time)); } id++; backupkeys.Add(id); Debug.Log("No fetchedlid " + FetchedList.Count); } }