Esempio n. 1
0
 private TwitterReverseGeocodeParameters(TwitterReverseGeocodeQuery query, JObject obj) : base(obj)
 {
     Query       = query;
     Accuracy    = obj.GetInt32("accuracy");
     Granularity = obj.GetString("granularity", TwitterUtils.ParseGranularity);
     Coordinates = obj.GetObject("coordinates", TwitterCoordinates.Parse);
 }
Esempio n. 2
0
 public static TwitterCoordinates[] ParseMultiple(JArray array)
 {
     if (array == null)
     {
         return(new TwitterCoordinates[0]);
     }
     TwitterCoordinates[] temp = new TwitterCoordinates[array.Count];
     for (int i = 0; i < array.Count; i++)
     {
         temp[i] = Parse(array.GetArray(i));
     }
     return(temp);
 }
Esempio n. 3
0
        private TwitterBoundingBox(JObject obj) : base(obj)
        {
            // Get the array
            JArray coordinates = obj.GetArray("coordinates");

            // Initialize properties
            Type        = obj.GetString("type");
            Coordinates = new TwitterCoordinates[coordinates.Count][];

            // Parse the coordinates
            for (int i = 0; i < coordinates.Count; i++)
            {
                Coordinates[i] = TwitterCoordinates.ParseMultiple(coordinates.GetArray(i));
            }
        }