Chromium Code Reviews| Index: src/site/samples/geolocation/index.markdown |
| diff --git a/src/site/samples/geolocation/index.markdown b/src/site/samples/geolocation/index.markdown |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f133da387b172a592734ef2c148a80f4b7974020 |
| --- /dev/null |
| +++ b/src/site/samples/geolocation/index.markdown |
| @@ -0,0 +1,30 @@ |
| +--- |
| +layout: default |
| +title: A Basic Geolocation Example |
| +live_example_url: example/index.html |
| +header: |
| + css: ["/samples/samples.css"] |
| +--- |
| + |
| +## {{ page.title }} |
| + |
| +Read the |
| +[source](https://github.com/dart-lang/dart-samples/tree/master/web/html5/geolocation/trip_meter). |
|
Kathy Walrath
2013/10/28 18:08:04
The source link should be down by the example (for
shailentuli
2013/10/28 19:56:18
Done.
|
| + |
| +The Geolocation API lets you track a user's location. The API is |
|
Kathy Walrath
2013/10/28 18:08:04
Does Geolocation really need to be capitalized?
shailentuli
2013/10/28 19:56:18
It is the name of an API. So, yes.
|
| +device agnostic; the underlying mechanism might be via GPS, |
| +wifi, or simply asking the user to enter their location manually. Since |
| +these lookups can take some time, the API is asynchronous, and you |
| +pass it a callback method whenever you request a location. |
| + |
| +The Trip Meter example displays the user's initial location, and it |
| +tracks the distance the user has travelled since the page was loaded. |
| + |
| +You can open the example in Dart Editor and run it by clicking `index.html`. |
| + |
| +<iframe class="running-app-frame" |
| + style="height:300px;width:100%;" |
| + src="{{page.live_example_url}}"> |
| +</iframe> |
| + |
| +See all [samples](/samples/). |