获取地理位置
Showing
1 changed file
with
5 additions
and
4 deletions
| ... | @@ -305,10 +305,7 @@ angular.module('myApp') | ... | @@ -305,10 +305,7 @@ angular.module('myApp') |
| 305 | appClient.getGPS('', function (data, cb) { | 305 | appClient.getGPS('', function (data, cb) { |
| 306 | 306 | ||
| 307 | var obj = toJson(data) | 307 | var obj = toJson(data) |
| 308 | layer.open({ | 308 | |
| 309 | content: obj.latitude, | ||
| 310 | time: 5 | ||
| 311 | }) | ||
| 312 | // layer.open({ | 309 | // layer.open({ |
| 313 | // content: obj.latitude, | 310 | // content: obj.latitude, |
| 314 | // time: 5 | 311 | // time: 5 |
| ... | @@ -379,6 +376,10 @@ angular.module('myApp') | ... | @@ -379,6 +376,10 @@ angular.module('myApp') |
| 379 | function onSuccess(position){ | 376 | function onSuccess(position){ |
| 380 | var longitude = position.longitude; | 377 | var longitude = position.longitude; |
| 381 | var latitude = position.latitude; | 378 | var latitude = position.latitude; |
| 379 | layer.open({ | ||
| 380 | content: JSON.stringify(position), | ||
| 381 | time: 5 | ||
| 382 | }) | ||
| 382 | $rootScope.currentPoint = { | 383 | $rootScope.currentPoint = { |
| 383 | longitude : longitude , | 384 | longitude : longitude , |
| 384 | latitude : latitude | 385 | latitude : latitude | ... | ... |
-
Please register or sign in to post a comment