3e50cdc4 by unknown

获取地理位置

1 parent 39cbf048
...@@ -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
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!