Skip to content

Instantly share code, notes, and snippets.

@chrismetcalf
Created April 10, 2012 00:16
Show Gist options
  • Save chrismetcalf/2347549 to your computer and use it in GitHub Desktop.
Save chrismetcalf/2347549 to your computer and use it in GitHub Desktop.
// Location value is special
double latitude = (rand.nextInt(180000)/1000.0) - 90.0;
double longitude = (rand.nextInt(360000)/1000.0) - 180.0;
Map<String, Double> location = new HashMap<String,Double>();
location.put("latitude", latitude);
location.put("longitude", longitude);
r.putDataField(v.getColumnByApiIdentifier("location"), location);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment