77ef2344 by ex

GPS

1 parent dcdc695d
...@@ -303,6 +303,10 @@ angular.module('myApp') ...@@ -303,6 +303,10 @@ angular.module('myApp')
303 },1000) 303 },1000)
304 } else { 304 } else {
305 appClient.getGPS('', function (data, cb) { 305 appClient.getGPS('', function (data, cb) {
306 layer.open({
307 content: data,
308 time: 5
309 })
306 var latitude = '' 310 var latitude = ''
307 var longitude = '' 311 var longitude = ''
308 312
...@@ -371,28 +375,14 @@ angular.module('myApp') ...@@ -371,28 +375,14 @@ angular.module('myApp')
371 375
372 376
373 function onSuccess(position){ 377 function onSuccess(position){
374 // layer.open({
375 // content: JSON.stringify(position)+',longitude:'+ position.longitude+',latitude:' + position.latitude,
376 // time: 5
377 // })
378
379 var longitude = position.longitude; 378 var longitude = position.longitude;
380 var latitude = position.latitude; 379 var latitude = position.latitude;
381 // layer.open({
382 // content: latitude,
383 // time: 2
384 // })
385 // layer.open({
386 // content: longitude,
387 // time: 5
388 // })
389 $rootScope.currentPoint = { 380 $rootScope.currentPoint = {
390 longitude : longitude , 381 longitude : longitude ,
391 latitude : latitude 382 latitude : latitude
392 } 383 }
393 var convertor = new BMap.Convertor(); 384 var convertor = new BMap.Convertor();
394 var pointArr = []; 385 var pointArr = [];
395 // alert(longitude, latitude);
396 pointArr.push(new BMap.Point(longitude, latitude)); 386 pointArr.push(new BMap.Point(longitude, latitude));
397 convertor.translate(pointArr, 3, 5, function(data){ 387 convertor.translate(pointArr, 3, 5, function(data){
398 var point = data.points[0]; 388 var point = data.points[0];
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!