usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [8/9] incubator-usergrid git commit: Converted geolocation page.
Date Mon, 03 Aug 2015 21:19:04 GMT
Converted geolocation page.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/840c4a0d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/840c4a0d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/840c4a0d

Branch: refs/heads/ug2-doc-update
Commit: 840c4a0d7efdd3e5c0ba5cbee62ee392822306ac
Parents: 961a38f
Author: Dave Johnson <snoopdave@apache.org>
Authored: Mon Aug 3 16:16:53 2015 -0400
Committer: Dave Johnson <snoopdave@apache.org>
Committed: Mon Aug 3 16:16:53 2015 -0400

----------------------------------------------------------------------
 docs/geolocation/geolocation.md     | 72 +++++++++++++++++++++++++++++++-
 docs/index.rst                      | 20 ++++-----
 docs/reference/presos-and-videos.md | 22 ++++------
 3 files changed, 89 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/840c4a0d/docs/geolocation/geolocation.md
----------------------------------------------------------------------
diff --git a/docs/geolocation/geolocation.md b/docs/geolocation/geolocation.md
index f22475c..ede4e3c 100644
--- a/docs/geolocation/geolocation.md
+++ b/docs/geolocation/geolocation.md
@@ -1,2 +1,72 @@
-# Geolocation
+# Geolocating your Entities 
+Many of today's apps are enhanced by the use of geolocation – wireless detection of the
physical location of a remote device. These apps determine the user's position and use this
data to enhance user experience. For example, apps can capture the exact location where a
picture was taken or determine what businesses stored in the database to return to the user
based on their current location.
+
+API Services provides a standard format for storing geolocation information in any entity,
as well as syntax for querying that data based on distance from a latitude/longitude point.
+
+## Saving location data in an entity
+In API Services, geolocation data is saved in the location property of an entity with latitude
and longitude sub-properites in the following format:
+
+    "location": {	
+        "latitude": <latitude_coordinate>,
+        "longitude": <longitude_coordinate>  
+    } 	
+    
+An entity's geolocation can be specified when the entity is [created](../data-storage/entities.html#creating-custom-data-entities)
or added later by [updating](../data-storage/entities.html#updating-data-entities) an existing
entity.
+
+For example, the following entity describes a restaurant:
+
+	{
+	    "uuid" : "03ae956a-249f-11e3-9f80-d16344f5a0e1",
+	    "type" : "restaurant",
+	    "name" : "Rockadero",
+			"location": {
+			    "latitude": 37.779632,
+			    "longitude": -122.395131  
+			} 
+	    "created" : 1379975113142,
+	    "modified" : 1379975113142,
+	    "metadata" : {
+	      "path" : "/restaurants/03ae956a-249f-11e3-9f80-d16344f5a0e1"
+	}      
+	
+## Querying location data
+Location-aware apps require the ability to return content and results based on the user's
current location. To easily enable this, API Services supports the following query parameter
to retrieve entities within a specified distance of any geocoordinate based on its location
property:
+
+	location within <distance_in_meters> of <latitude>, <longitude>
+	
+The returned results are sorted from nearest to furthest. Entities with the same location
are returned in the order they were created.
+
+The location parameter can be appended to any standard API Services query. For more information
on how to query your API Services data, see Querying your data.
+
+For example, here is how you would find all the devices within 8,046 meters (~10 miles) of
the center of San Francisco:
+
+	curl -X GET https://api.usergrid.com/your-org/your-app/devices?ql=location within 8046 of
37.774989,-122.419413
+	
+## Enrich your app with location data
+Location-awareness has become a feature users expect in many types of mobile applications
because of its ability to create a more personalized and relevant experience for each user.
With this in mind, the geolocation feature in API Services was designed to work with many
of the available [default data entities](../api-docs.html#models) to allow app developers
to easily integrate powerful in-app features that can increase user engagement.
+
+Here are just a few of the ways that saving location data to a data entity can improve an
app:
+
+<table class="usergrid-table">
+<tr>
+  <th>Entity</th>
+  <th>Usage</th>
+</tr>
+<tr>
+  <td>user</td>
+  <td>Save the location of a user's home as part of their profile in the ``users``
collection to suggest upcoming special events or activities located nearby, or to display
advertisements that are relevant based on the user's proximity to a business.</td>
+</tr>
+<tr>
+  <td>device</td>
+  <td>Periodically save the location data returned from a user's device, then query
the ``devices`` collection to send offers and alerts to user's that are located near your
business with a [push notification](../push-notifications/push-notifications-overview).</td>
+</tr>
+<tr>
+  <td>activity</td>
+  <td>Create stronger social connections by associating a user ``activity`` with the
location where it occurred. The activity can then be displayed to nearby friends and family,
or used to enrich the user's activity stream.</td>
+</tr>
+<tr>
+  <td>asset</td>
+  <td>Save user photos with location data in the ``asset collection`` to allow users
to retrieve and sort their memories based on when and where they happened.</td>
+</tr>
+</table>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/840c4a0d/docs/index.rst
----------------------------------------------------------------------
diff --git a/docs/index.rst b/docs/index.rst
index 0bafb65..6800aa4 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -55,14 +55,6 @@ Apache Usergrid Documentation
    entity-connections/retrieving-entities
    entity-connections/disconnecting-entities
    
-.. _push-notifications:
-
-.. toctree::
-   :maxdepth: 2
-   :caption: Push Notifications
-  
-   push-notifications/tbd.md
-   
 .. _security-and-authentication:
 
 .. toctree::
@@ -93,7 +85,7 @@ Apache Usergrid Documentation
    :maxdepth: 2
    :caption: Geo-location
    
-   geolocation/tbd
+   geolocation/geolocation
    
 .. _asset-and-file-management:
 
@@ -118,7 +110,15 @@ Apache Usergrid Documentation
    :caption: Organizations and Applications
    
    orgs-and-apps/tbd
-   
+  
+.. _push-notifications:
+
+.. toctree::
+   :maxdepth: 2
+   :caption: Push Notifications
+  
+   push-notifications/tbd.md
+      
 .. _rest-endpoints:
 
 .. toctree::

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/840c4a0d/docs/reference/presos-and-videos.md
----------------------------------------------------------------------
diff --git a/docs/reference/presos-and-videos.md b/docs/reference/presos-and-videos.md
index 19caa13..2112d11 100644
--- a/docs/reference/presos-and-videos.md
+++ b/docs/reference/presos-and-videos.md
@@ -1,7 +1,12 @@
-# Presentations
+# Presentations & Videos
+
+## Building Mobile Apps with Apache Usergrid
+- Screen-cast of a talk given by Dave Johnson at the All Things Open 2014, Raleigh, NC.
+
+<iframe width="560" height="315" src="https://www.youtube.com/embed/DjFG-QbxxLw" frameborder="0"
allowfullscreen></iframe>
 
 ## How to Contribute to Apache Usergrid
-- David Johnson, [ApacheCon NA 2014](http://apacheconnorthamerica2014.sched.org/event/29971aabd3c86398be2ae93403c7d1d2)
+- David Johnson at [ApacheCon NA 2014](http://apacheconnorthamerica2014.sched.org/event/29971aabd3c86398be2ae93403c7d1d2)
 
 <iframe src="http://www.slideshare.net/slideshow/embed_code/33275731" width="600" height="400"
frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;
border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe>
 
@@ -20,18 +25,7 @@
 
 <iframe src="http://www.slideshare.net/slideshow/embed_code/9476483" width="600" height="400"
frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC;
border-width
 
-# Videos
-
-Talks and presentations about Usergrid.
-
-## Building Mobile Apps with Apache Usergrid
-
-Screen-cast of a talk given by Dave Johnson at the All Things Open 2014, Raleigh, NC.
-
-<iframe width="560" height="315" src="https://www.youtube.com/embed/DjFG-QbxxLw" frameborder="0"
allowfullscreen></iframe>
-
 ## Cassandra at Apigee, Usergrid Powering Mobile
-
-Video of talk given by Ed Anuff at the Cassandra Summit 2012, Santa Clara, CA.
+- Video of talk given by Ed Anuff at the Cassandra Summit 2012, Santa Clara, CA.
 
 <iframe width="640" height="360" src="http://www.youtube.com/embed/RuJwIBu3jvs?rel=0"
frameborder="0" allowfullscreen></iframe>
\ No newline at end of file


Mime
View raw message