Package com.amazonaws.geo.model

Examples of com.amazonaws.geo.model.PutPointRequest


          GeoPoint geoPoint = new GeoPoint(latitude, longitude);
          AttributeValue rangeKeyValue = new AttributeValue().withS(schoolId);
          AttributeValue schoolNameValue = new AttributeValue().withS(schoolName);

          PutPointRequest putPointRequest = new PutPointRequest(geoPoint, rangeKeyValue);
          putPointRequest.getPutItemRequest().getItem().put("schoolName", schoolNameValue);

          geoDataManager.putPoint(putPointRequest);
        }
      } catch (IOException e) {
        throw new RuntimeException(e);
View Full Code Here


  private void putPoint(JSONObject requestObject, PrintWriter out) throws IOException, JSONException {
    GeoPoint geoPoint = new GeoPoint(requestObject.getDouble("lat"), requestObject.getDouble("lng"));
    AttributeValue rangeKeyAttributeValue = new AttributeValue().withS(UUID.randomUUID().toString());
    AttributeValue schoolNameKeyAttributeValue = new AttributeValue().withS(requestObject.getString("schoolName"));

    PutPointRequest putPointRequest = new PutPointRequest(geoPoint, rangeKeyAttributeValue);
    putPointRequest.getPutItemRequest().addItemEntry("schoolName", schoolNameKeyAttributeValue);

    PutPointResult putPointResult = geoDataManager.putPoint(putPointRequest);

    printPutPointResult(putPointResult, out);
  }
View Full Code Here

TOP

Related Classes of com.amazonaws.geo.model.PutPointRequest

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.