2011-03-23 2 views
2

지도에서 사람들을 추적하는 앱을 Sencha에서 만들고 있습니다. 내가 알고 싶은 것은 다른 사람들을 추적해야하는 것입니다. 위도와 경도가 필요하지만 어떻게 접근해야하는지 모르겠습니다. 답변이 있으십니까?Sencha의 위치 정보

답변

2
var geo = Ext.create('Ext.util.Geolocation', { 
    autoUpdate: false, 
    listeners: { 
     locationupdate: function (geo) { 

      var marker = new google.maps.Marker({ 
       position: position, 
       map: map, 
       visible: true, 
       animation: google.maps.Animation.DROP, 
       icon: '/Resources/icons/[email protected]', 

      }); 

     }, 
     locationerror: function (geo, bTimeout, bPermissionDenied, bLocationUnavailable, message) { 
      Ext.Msg.alert('Error', message, Ext.emptyFn); 

     } 
    } 
}); 

geo.updateLocation(); 
관련 문제