Skip to content
Permalink
Browse files
Merge renamed tests dir
  • Loading branch information
Edna Morales committed Aug 13, 2014
2 parents 24b86dd + 041807f commit d794292fcfd9cc9060906e0de142925a67b15df5
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 25 deletions.
@@ -68,3 +68,11 @@
* pass by only coords
* proper implementation for firefoxos
* call FxOS's getCurrentProxy added

### 0.3.9 (Aug 06, 2014)
* **FFOS** update GeolocationProxy.js
* CB-7187 ios: Add explicit dependency on CoreLocation.framework
* CB-7187 Delete unused #import of CDVShared.h
* CB-6127 Updated translations for docs
* ios: Changed distanceFilter from none to 5 meters, prevents it from spamming the callback even though nothing changed.

@@ -22,7 +22,7 @@
xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
id="org.apache.cordova.geolocation"
version="0.3.9-dev">
version="0.3.10-dev">

<name>Geolocation</name>
<description>Cordova Geolocation Plugin</description>
@@ -192,14 +192,55 @@ xmlns:android="http://schemas.android.com/apk/res/android"
<config-file target="package.appxmanifest" parent="/Package/Capabilities">
<DeviceCapability Name="location" />
</config-file>

<js-module src="src/windows/GeolocationProxy.js" name="GeolocationProxy">
<runs />
</js-module>

<js-module src="www/Coordinates.js" name="Coordinates">
<clobbers target="Coordinates" />
</js-module>

<js-module src="www/PositionError.js" name="PositionError">
<clobbers target="PositionError" />
</js-module>
<js-module src="src/windows8/GeolocationProxy.js" name="GeolocationProxy">
<merges target="" />

<js-module src="www/Position.js" name="Position">
<clobbers target="Position" />
</js-module>

<js-module src="www/geolocation.js" name="geolocation">
<clobbers target="navigator.geolocation" />
</js-module>
</platform>

<!-- windows universal apps (Windows 8.1, Windows Phone 8.1, Windows 8.0) -->
<platform name="windows">
<config-file target="package.appxmanifest" parent="/Package/Capabilities">
<DeviceCapability Name="location" />
</config-file>

<js-module src="src/windows/GeolocationProxy.js" name="GeolocationProxy">
<runs />
</js-module>

<js-module src="www/Coordinates.js" name="Coordinates">
<clobbers target="Coordinates" />
</js-module>

<js-module src="www/PositionError.js" name="PositionError">
<clobbers target="PositionError" />
</js-module>

<js-module src="www/Position.js" name="Position">
<clobbers target="Position" />
</js-module>

<js-module src="www/geolocation.js" name="geolocation">
<clobbers target="navigator.geolocation" />
</js-module>
</platform>

<!-- firefoxos -->
<platform name="firefoxos">
<config-file target="config.xml" parent="/*">
@@ -61,4 +61,4 @@ module.exports = {
}
};

require("cordova/firefoxos/commandProxy").add("Geolocation", module.exports);
require("cordova/exec/proxy").add("Geolocation", module.exports);
@@ -48,6 +48,27 @@ function createErrorCode() {
break;
}
}
function createResult(pos) {
var res = {
accuracy: pos.coordinate.accuracy,
heading: pos.coordinate.heading,
velocity: pos.coordinate.speed,
altitudeAccuracy: pos.coordinate.altitudeAccuracy,
timestamp: pos.coordinate.timestamp
}

if (pos.coordinate.point) {
res.latitude = pos.coordinate.point.position.latitude;
res.longitude = pos.coordinate.point.position.longitude;
res.altitude = pos.coordinate.point.position.altitude;
} else { // compatibility with old windows8.0 api
res.latitude = pos.coordinate.latitude;
res.longitude = pos.coordinate.longitude;
res.altitude = pos.coordinate.altitude;
}

return res;
}

module.exports = {
getLocation: function (success, fail, args, env) {
@@ -65,16 +86,7 @@ module.exports = {

loc.getGeopositionAsync().then(
function (pos) {
success({
latitude: pos.coordinate.latitude,
longitude: pos.coordinate.longitude,
altitude: pos.coordinate.altitude,
accuracy: pos.coordinate.accuracy,
heading: pos.coordinate.heading,
velocity: pos.coordinate.speed,
altitudeAccuracy: pos.coordinate.altitudeAccuracy,
timestamp: pos.coordinate.timestamp
});
success(createResult(pos));
},
function (err) {
fail({
@@ -99,16 +111,7 @@ module.exports = {
highAccuracy = args[1],

onPositionChanged = function (e) {
success({
latitude: e.position.coordinate.latitude,
longitude: e.position.coordinate.longitude,
altitude: e.position.coordinate.altitude,
accuracy: e.position.coordinate.accuracy,
heading: e.position.coordinate.heading,
velocity: e.position.coordinate.speed,
altitudeAccuracy: e.position.coordinate.altitudeAccuracy,
timestamp: e.position.coordinate.timestamp
});
success(createResult(e.position));
},

onStatusChanged = function (e) {
@@ -160,4 +163,4 @@ module.exports = {
}
};

require("cordova/exec/proxy").add("Geolocation", module.exports);
require("cordova/exec/proxy").add("Geolocation", module.exports);
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->

<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
id="org.apache.cordova.geolocation.tests"
version="0.3.8-dev">
<name>Cordova Geolocation Plugin Tests</name>
<license>Apache 2.0</license>

<js-module src="tests.js" name="tests">
</js-module>
</plugin>
File renamed without changes.

0 comments on commit d794292

Please sign in to comment.