如何检索照片对象以显示google在texture2D中的照片?
我使用无限码谷歌地图API并显示地名等级并放置照片,结果我得到了照片对象。现在帮我看看如何将这个照片对象转换为要显示的纹理。
public class FindPlacesExample: MonoBehaviour
{
.......
List<OnlineMapsMarker> markers = new List<OnlineMapsMarker>();
//int count = 0;
foreach (OnlineMapsGooglePlacesResult result in results)
{
//count++;
// Log name and location of each result.
//Debug.Log(result.name);
//Debug.Log(result.location);
// Create a marker at the location of the result.
OnlineMapsMarker marker = OnlineMaps.instance.AddMarker(result.location, result.name);
string[] customDataArray = new string[5];
customDataArray[0]= result.place_id;
customDataArray[1] = result.name.Replace("amp;","");
customDataArray[2] = result.rating.ToString();
customDataArray[3] = result.open_now.ToString();
customDataArray[4] = "";
marker.customData = customDataArray;
marker.OnClick += OnMarkerClick;
markers.Add(marker);
}
结果我得到了照片对象。