Lisa testing pulling in plugins for plugin: cordova-plugin-geolocation
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/c0dd14f0 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/c0dd14f0 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/c0dd14f0 Branch: refs/heads/master Commit: c0dd14f0394f230dbb2b88b8e5c49fd4494daa9c Parents: fc2a7a4 Author: ldeluca <[email protected]> Authored: Tue May 27 17:49:36 2014 -0400 Committer: ldeluca <[email protected]> Committed: Tue May 27 17:49:36 2014 -0400 ---------------------------------------------------------------------- doc/ja/index.md | 255 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 255 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/c0dd14f0/doc/ja/index.md ---------------------------------------------------------------------- diff --git a/doc/ja/index.md b/doc/ja/index.md new file mode 100644 index 0000000..bddd5ed --- /dev/null +++ b/doc/ja/index.md @@ -0,0 +1,255 @@ +<!--- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +# org.apache.cordova.geolocation + +This plugin provides information about the device's location, such as latitude and longitude. ä½ç½®æ å ±ã®å ±éã®ã½ã¼ã¹ã¯ã°ãã¼ãã« ãã¸ã·ã§ãã³ã° ã·ã¹ãã ï¼GPSï¼ ã¨ IP ã¢ãã¬ã¹ãRFIDãWiFi ããã³ Bluetooth ã® MAC ã¢ãã¬ã¹ãããã³ GSM/cdma æ¹å¼æºå¸¯ Id ãªã©ã®ãããã¯ã¼ã¯ä¿¡å·ããæ¨å®ãããå ´æã«ãããã¾ãã API ã¯ãããã¤ã¹ã®å®éã®å ´æãè¿ããã¨ã®ä¿è¨¼ã¯ããã¾ããã + +ãã® API ã¯[W3C å°çä½ç½®æ å ± API 仿§][1]ã«åºã¥ãã¦ãããæ¢ã«å®è£ ãæä¾ããªãããã¤ã¹ä¸ã®ã¿ã§å®è¡ãã¾ãã + + [1]: http://dev.w3.org/geo/api/spec-source.html + +**è¦å**: å°çä½ç½®æ å ±ãã¼ã¿ã®åéã¨å©ç¨ãéè¦ãªãã©ã¤ãã·ã¼ã®åé¡ãçºçããã¾ãã ã¢ããªã®ãã©ã¤ãã·ã¼ ããªã·ã¼ã¯ä»ã®å½äºè ã¨ãã¼ã¿ (ãã¨ãã°ãç²ããç½°éãéµä¾¿çªå·ã¬ãã«ãç) ã®ç²¾åº¦ã®ã¬ãã«ã§ã¯å ±æããã¦ãããã©ãããã¢ããªãå°çä½ç½®æ å ±ãã¼ã¿ã使ç¨ããæ¹æ³ãè°è«ãã¹ãã§ãã å°çä½ç½®æ å ±ãã¼ã¿ã¨ä¸è¬ã«è¦ãªãããææãªã¦ã¼ã¶ã¼ã®å± å ´æãé示ãããã¨ãã§ãã¾ãã®ã§ãå½¼ãã®æ è¡ã®æ´å²ä¿åããã¦ããå ´åã ãããã£ã¦ãã¢ããªã®ãã©ã¤ãã·ã¼ ããªã·ã¼ã«å ãã¦ãå¼·ãããå¿ è¦ãããã¾ã (ããã¤ã¹ ãªãã¬ã¼ãã£ã³ã° ã·ã¹ãã ããªãå ´åããæ¢ã«)ãã¢ããªã±ã¼ã·ã§ã³ã«å°çä½ç½®æ å ±ãã¼ã¿ãã¢ã¯ã»ã¹ããåã« - æéã®ãç¥ãããæä¾ãã¾ãã ãã®éç¥ã¯ãä¸è¨ã® (ä¾ãã°ã **[ok]**ã**ãããã§**鏿è¢ãæ 示ãã) ã«ãã£ã¦ã¦ã¼ã¶ã¼ã®ã¢ã¯ã»ã¹è¨±å¯ãåå¾ããã ãã§ãªããåãæ å ±ãæä¾ããå¿ è¦ãããã¾ãã 詳細ã«ã¤ãã¦ã¯ããã©ã¤ãã·ã¼ã«é¢ããã¬ã¤ããåç §ãã¦ãã ããã + +## ã¤ã³ã¹ãã¼ã« + + cordova plugin add org.apache.cordova.geolocation + + +### Firefox OS Quirks + +Create **www/manifest.webapp** as described in [Manifest Docs][2]. Add permisions: + + [2]: https://developer.mozilla.org/en-US/Apps/Developing/Manifest + + "permissions": { + "geolocation": { "description": "Used to position the map to your current position" } + } + + +## ãµãã¼ãããã¦ãããã©ãããã©ã¼ã + +* ã¢ãã¾ã³ç« OS +* ã¢ã³ããã¤ã +* ãã©ãã¯ããªã¼ 10 +* Firefox OS +* iOS +* Tizen +* Windows Phone 7 㨠8 +* Windows 8 + +## ã¡ã½ãã + +* navigator.geolocation.getCurrentPosition +* navigator.geolocation.watchPosition +* navigator.geolocation.clearWatch + +## ãªãã¸ã§ã¯ã (èªã¿åãå°ç¨) + +* Position +* PositionError +* Coordinates + +## navigator.geolocation.getCurrentPosition + +Returns the device's current position to the `geolocationSuccess` callback with a `Position` object as the parameter. ã¨ã©ã¼ãããå ´åã `geolocationError` ã³ã¼ã«ããã¯ã«æ¸¡ãããã `PositionError` ãªãã¸ã§ã¯ãã + + navigator.geolocation.getCurrentPosition(geolocationSuccess, + [geolocationError], + [geolocationOptions]); + + +### ãã©ã¡ã¼ã¿ã¼ + +* **geolocationSuccess**: ç¾å¨ã®ä½ç½®ã渡ãããã³ã¼ã«ããã¯ã + +* **geolocationError**: *(çç¥å¯è½)*ã¨ã©ã¼ãçºçããå ´åã«å®è¡ãããã³ã¼ã«ããã¯ã + +* **geolocationOptions**: *(ãªãã·ã§ã³)*å°çä½ç½®æ å ±ã®ãªãã·ã§ã³ã§ãã + +### ä¾ + + // onSuccess Callback + // This method accepts a Position object, which contains the + // current GPS coordinates + // + var onSuccess = function(position) { + alert('Latitude: ' + position.coords.latitude + '\n' + + 'Longitude: ' + position.coords.longitude + '\n' + + 'Altitude: ' + position.coords.altitude + '\n' + + 'Accuracy: ' + position.coords.accuracy + '\n' + + 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' + + 'Heading: ' + position.coords.heading + '\n' + + 'Speed: ' + position.coords.speed + '\n' + + 'Timestamp: ' + position.timestamp + '\n'); + }; + + // onError Callback receives a PositionError object + // + function onError(error) { + alert('code: ' + error.code + '\n' + + 'message: ' + error.message + '\n'); + } + + navigator.geolocation.getCurrentPosition(onSuccess, onError); + + +## navigator.geolocation.watchPosition + +Returns the device's current position when a change in position is detected. ããã¤ã¹ãæ°ããå ´æãåå¾ããã¨ãã `geolocationSuccess` ã³ã¼ã«ããã¯ãå®è¡ããã¨ã `Position` ãªãã¸ã§ã¯ãããã©ã¡ã¼ã¿ã¼ã¨ãã¦ã ã¨ã©ã¼ãããå ´åã `geolocationError` ã³ã¼ã«ããã¯ãå®è¡ããã¨ã `PositionError` ãªãã¸ã§ã¯ãããã©ã¡ã¼ã¿ã¼ã¨ãã¦ã + + var watchId = navigator.geolocation.watchPosition(geolocationSuccess, + [geolocationError], + [geolocationOptions]); + + +### ãã©ã¡ã¼ã¿ã¼ + +* **geolocationSuccess**: ç¾å¨ã®ä½ç½®ã渡ãããã³ã¼ã«ããã¯ã + +* **geolocationError**: (çç¥å¯è½) ã¨ã©ã¼ãçºçããå ´åã«å®è¡ãããã³ã¼ã«ããã¯ã + +* **geolocationOptions**: (ãªãã·ã§ã³) å°çä½ç½®æ å ±ã®ãªãã·ã§ã³ã§ãã + +### è¿ãã¾ã + +* **String**: returns a watch id that references the watch position interval. The watch id should be used with `navigator.geolocation.clearWatch` to stop watching for changes in position. + +### ä¾ + + // onSuccess Callback + // This method accepts a `Position` object, which contains + // the current GPS coordinates + // + function onSuccess(position) { + var element = document.getElementById('geolocation'); + element.innerHTML = 'Latitude: ' + position.coords.latitude + '<br />' + + 'Longitude: ' + position.coords.longitude + '<br />' + + '<hr />' + element.innerHTML; + } + + // onError Callback receives a PositionError object + // + function onError(error) { + alert('code: ' + error.code + '\n' + + 'message: ' + error.message + '\n'); + } + + // Options: throw an error if no update is received every 30 seconds. + // + var watchID = navigator.geolocation.watchPosition(onSuccess, onError, { timeout: 30000 }); + + +## geolocationOptions + +å°çä½ç½®æ å ±ã®æ¤ç´¢ãã«ã¹ã¿ãã¤ãºããããã®çç¥å¯è½ãªãã©ã¡ã¼ã¿ã¼`Position`. + + {maximumAge: 3000ãã¿ã¤ã ã¢ã¦ã: 5000ãenableHighAccuracy: true}; + + +### ãªãã·ã§ã³ + +* **enableHighAccuracy**ï¼ æé«ã®çµæããã¢ããªã±ã¼ã·ã§ã³ã«å¿ è¦ããããã¨ã®ãã³ãã示ãã¾ãã æ¢å®ã§ã¯ãããã¤ã¹ã®åå¾ã試ã¿ã¾ãã `Position` ãããã¯ã¼ã¯ ãã¼ã¹ã®ã¡ã½ããã使ç¨ãã¾ãã ãã®ããããã£ãè¨å®ãã `true` è¡ææ¸¬ä½ãªã©ã®ããæ£ç¢ºãªæ¹æ³ã使ç¨ããããã«ãã¬ã¼ã ã¯ã¼ã¯ã«æç¤ºãã¾ãã *(ãã¼ã«å¤)* + +* **timeout**: The maximum length of time (milliseconds) that is allowed to pass from the call to `navigator.geolocation.getCurrentPosition` or `geolocation.watchPosition` until the corresponding `geolocationSuccess` callback executes. å ´åã¯ã `geolocationSuccess` ãã®æéå ã«ãã³ã¼ã«ããã¯ã¯å¼ã³åºããã¾ããã `geolocationError` ã³ã¼ã«ããã¯ã«æ¸¡ãããã `PositionError.TIMEOUT` ã®ã¨ã©ã¼ ã³ã¼ãã (ã¨çµã¿åããã¦ä½¿ç¨ããã¨ãã«æ³¨æãã¦ãã ãã `geolocation.watchPosition` ã® `geolocationError` ééã§ã³ã¼ã«ããã¯ãå¼ã³åºããã¨ãã§ãã¾ããã¹ã¦ `timeout` ããªç§ ï¼)*(æ°)* + +* **maximumAge**ï¼ å¹´é½¢ãããããªç§åä½ã§æå®ããæéããã大ãããªããã£ãã·ã¥ãããä½ç½®ãåãå ¥ãã¾ãã*(æ°)* + +### Android ã®ç + +éã android 2.x ã¨ãã¥ã¬ã¼ã¿ã¼å°çä½ç½®æ å ±ã®çµæãè¿ããªãã `enableHighAccuracy` ãªãã·ã§ã³ãè¨å®ãã¾ãã`true`. + +## navigator.geolocation.clearWatch + +ã«ãã£ã¦åç §ããããããã¤ã¹ã®å ´æã¸ã®å¤æ´ãè¦ã¦åæ¢ã `watchID` ãã©ã¡ã¼ã¿ã¼ã + + navigator.geolocation.clearWatch(watchID); + + +### ãã©ã¡ã¼ã¿ã¼ + +* **watchID**: ã® idã `watchPosition` ãã¯ãªã¢ããééã(æåå) + +### ä¾ + + //ãªãã·ã§ã³: ä½ç½®ã®å¤åãç£è¦ããé »ç¹ã«ä½¿ç¨//æ£ç¢ºãªä½ç½®å徿³å©ç¨å¯è½ã + // + var watchID = navigator.geolocation.watchPosition(onSuccess, onError, { enableHighAccuracy: true }); + + // ...later on... + + navigator.geolocation.clearWatch(watchID); + + +## Position + +å«ã¾ãã¦ãã¾ã `Position` 座æ¨ãå°çä½ç½®æ å ± API ã§ä½æãããã¿ã¤ã ã¹ã¿ã³ãã + +### ãããã㣠+ +* **coords**: å°çç座æ¨ã®ã»ããã*ï¼åº§æ¨ï¼* + +* **ã¿ã¤ã ã¹ã¿ã³ã**: 使ã®ã¿ã¤ã ã¹ã¿ã³ãã `coords` ã*ï¼æ¥ï¼* + +## Coordinates + +A `Coordinates` object is attached to a `Position` object that is available to callback functions in requests for the current position. It contains a set of properties that describe the geographic coordinates of a position. + +### ãããã㣠+ +* **緯度**: 10 度緯度ã*(æ°)* + +* **çµåº¦**: 10 é²åº¦ã®çµåº¦ã*(æ°)* + +* **é«åº¦**: æ¥åä½ä¸ã®ã¡ã¼ãã«ã®ä½ç½®ã®é«ãã*(æ°)* + +* **精度**: ã¡ã¼ãã«ã®ç·¯åº¦ã¨çµåº¦åº§æ¨ã®ç²¾åº¦ã¬ãã«ã*(æ°)* + +* **altitudeAccuracy**ï¼ ã¡ã¼ãã«ã®é«åº¦åº§æ¨ã®ç²¾åº¦ã¬ãã«ã*(æ°)* + +* **è¦åºã**: é²è¡æ¹åãã«ã¦ã³ããçåããæè¨åãã®è§åº¦ã§æå®ãã¾ãã*(æ°)* + +* **é度**ï¼ æ¯ç§ã¡ã¼ãã«ã§æå®ãããããã¤ã¹ã®ç¾å¨ã®å¯¾å°é度ã*(æ°)* + +### Amazon Fire OS Quirks + +**altitudeAccuracy**ï¼ è¿ãã® Android ããã¤ã¹ã§ãµãã¼ãããã¦ãã¾ãã`null`. + +### Android ã®ç + +**altitudeAccuracy**ï¼ è¿ãã® Android ããã¤ã¹ã§ãµãã¼ãããã¦ãã¾ãã`null`. + +## PositionError + +The `PositionError` object is passed to the `geolocationError` callback function when an error occurs with navigator.geolocation. + +### ãããã㣠+ +* **ã³ã¼ã**: 次ã®ããããã®å®ç¾©æ¸ã¿ã®ã¨ã©ã¼ ã³ã¼ãã + +* **ã¡ãã»ã¼ã¸**: çºçããã¨ã©ã¼ã®è©³ç´°ã説æããã¨ã©ã¼ ã¡ãã»ã¼ã¸ã + +### 宿° + +* `PositionError.PERMISSION_DENIED` + * Returned when users do not allow the app to retrieve position information. This is dependent on the platform. +* `PositionError.POSITION_UNAVAILABLE` + * Returned when the device is unable to retrieve a position. In general, this means the device is not connected to a network or can't get a satellite fix. +* `PositionError.TIMEOUT` + * Returned when the device is unable to retrieve a position within the time specified by the `timeout` included in `geolocationOptions`. When used with `navigator.geolocation.watchPosition`, this error could be repeatedly passed to the `geolocationError` callback every `timeout` milliseconds. \ No newline at end of file
