Ejemplo n.º 1
0
 void Nearby_Process(Places places_result)
 {
     foreach (Place place in places_result.results)
     {
         place.worldPos = GooglePlacesUtils.LatLonToUnityCoordination(place.geometry.location.lat, place.geometry.location.lng, map) + mapOrigin.position;
         print("name: " + place.name + "\nrating: " + place.rating
               + "\nlocation: " + place.geometry.location.lat + ", " + place.geometry.location.lng
               + "\nphoto_reference: " + (place.photos != null ? place.photos[0].photo_reference : "null")
               );
     }
 }
Ejemplo n.º 2
0
    public Vector3 RetrieveLocation()
    {
        #if !UNITY_EDITOR
        var data = Input.location.lastData;
        pos = GooglePlacesUtils.LatLonToUnityCoordination(data.latitude, data.longitude, map) + mapOrigin.position;
        #else
        pos = GooglePlacesUtils.LatLonToUnityCoordination(lat, lng, map) + mapOrigin.position;
        #endif


        return(pos);
    }