Package com.simplegeo.client.types

Examples of com.simplegeo.client.types.FeatureCollection


      String jsonString = client.search(lat, lon, params);
      JSONObject json = new JSONObject(jsonString);
     
      Assert.assertNotNull(json);
     
      FeatureCollection collection = FeatureCollection.fromJSON(json);
     
      Assert.assertNotNull(collection);
    } catch (IOException e) {
      Assert.fail(e.getMessage());
    } catch (JSONException e) {
View Full Code Here


      String jsonString = client.search("salad dressing", params);
      JSONObject json = new JSONObject(jsonString);
     
      Assert.assertNotNull(json);
     
      FeatureCollection collection = FeatureCollection.fromJSON(json);
     
      Assert.assertNotNull(collection);
    } catch (IOException e) {
      Assert.fail(e.getMessage());
    } catch (JSONException e) {
View Full Code Here

      String jsonString = client.searchByAddress(address, params);
      JSONObject json = new JSONObject(jsonString);
     
      Assert.assertNotNull(json);
     
      FeatureCollection collection = FeatureCollection.fromJSON(json);
     
      Assert.assertNotNull(collection);
    } catch (IOException e) {
      Assert.fail(e.getMessage());
    } catch (JSONException e) {
View Full Code Here

  public void testSearchSync() {
    try {
      HashMap<String, String[]> params = new HashMap<String, String[]>();
      params.put("limit", new String[] {"10"});
      String jsonString = client.search(37.761809d, -122.422832d, "casey.testing.layer", params);
      FeatureCollection featureCollection = FeatureCollection.fromJSONString(jsonString);
     
      Assert.assertNotNull(featureCollection.getFeatures());
    } catch (IOException e) {
      Assert.fail(e.getMessage());     
    } catch (JSONException e) {
      Assert.fail(e.getMessage());     
    }
View Full Code Here

  public void testSearchByAddressSync() {
    try {
      HashMap<String, String[]> params = new HashMap<String, String[]>();
      params.put("limit", new String[] {"10"});
      String jsonString = client.searchByAddress("41 decatur st, san francisco, ca", "casey.testing.layer", params);
      FeatureCollection featureCollection = FeatureCollection.fromJSONString(jsonString);
     
      Assert.assertNotNull(featureCollection.getFeatures());
    } catch (IOException e) {
      Assert.fail(e.getMessage());     
    } catch (JSONException e) {
      Assert.fail(e.getMessage());     
    }
View Full Code Here

 
  @Test
  public void testSearchByIPSync() {
    try {
      String jsonString = client.searchByIP("173.164.219.53", "casey.testing.layer", null);
      FeatureCollection featureCollection = FeatureCollection.fromJSONString(jsonString);
     
      Assert.assertNotNull(featureCollection.getFeatures());
    } catch (IOException e) {
      Assert.fail(e.getMessage());     
    } catch (JSONException e) {
      Assert.fail(e.getMessage());     
    }
View Full Code Here

  @Test
  public void testSearchByMyIPSync() {
    try {
      String jsonString = client.searchByMyIP("casey.testing.layer", null);
      FeatureCollection featureCollection = FeatureCollection.fromJSONString(jsonString);
     
      Assert.assertNotNull(featureCollection.getFeatures());
    } catch (IOException e) {
      Assert.fail(e.getMessage());     
    } catch (JSONException e) {
      Assert.fail(e.getMessage());     
    }
View Full Code Here

TOP

Related Classes of com.simplegeo.client.types.FeatureCollection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.