0
A
回答
1
0
我想這兩個環節都和我的黑莓Curve(9330,OS 6.0)在返回0,0的經度和緯度。這是非常令人失望的,因爲我已經在其他設備上面使用了#2。周圍挖了將近一天後,我發現這對我的工作,黑莓(雖然我不能讓removeLocation處理工作
<html>
<body>
<script language="Javascript">
function removeLocation() {
// dummy function since removeLocationUpdate requires a callback
window.alert("location handler removed");
}
function getLocation() {
window.alert("Your new position is " + blackberry.location.latitude + " degrees latitude and " + blackberry.location.longitude + " degrees longitude.");
blackberry.location.removeLocationUpdate(removeLocation);
}
if(blackberry.location.GPSSupported) {
blackberry.location.setAidMode(1);
blackberry.location.refreshLocation();
blackberry.location.onLocationUpdate(getLocation);
} else {
alert('nope');
}
</script>
<p>detecting location....</p>
</body>
</html>
這個腳本使用幫助從這個鏈接過去後發現: http://www.blackberryforums.com/general-legacy-device-discussion/23544-7130e-gps-location-based-services-2.html
0
你可以嘗試這樣的事:
注*替換:YOUR_DESTINATION_ADDRESS在類似格式的地址:「147 +溫德姆+街道+ N +,+套房+ 206,+圭爾夫大學,+上, + N1H + 4E9「
<div id="Map" style="width: 100%; height: 600px;"> </div>
<script type="text/javascript">
$(function(){
var zoom = 11;
function success(position) {
var LAT = position.coords.latitude;
var LONG = position.coords.longitude;
$('#Map').append('<p>Current Latitude: ' + LAT + '<br/>Current Logitude: ' + LONG +'<br/><br/>Note* This may not display your exact location, but just your city. Works better on mobile devices</p>');
var map = '<iframe style="width: 100%; height: 600px;" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.ca/maps?source=s_d&saddr=' + LAT +',+' + LONG +'&daddr=**YOUR_DESTINATION_ADDRESS**&ie=UTF8&t=hz=' + zoom + '&output=embed"></iframe>';
$('#Map').append(map);
}
function error(){
/*Error Code*/
}
function MakeMap(){
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(success, error);
}
}
MakeMap();
});
</script>
相關問題
- 1. 黑莓GPS標準
- 2. 如何從外部登錄到網站?
- 3. 如何從Wordpress網站登錄到Codeigniter?
- 4. 從網站登錄網站
- 5. 黑莓應用程序(發送GPS座標到服務器...)
- 6. 從網站與黑莓溝通
- 7. 黑莓MapView劇情座標
- 8. 如何從iOS Webview登錄網站?
- 9. 如何從我的網站登錄DokuWiki?
- 10. 如何從iOS設備登錄網站?
- 11. 如何從Android登錄網站?
- 12. GPS座標不在黑莓9800使用的WebWorks
- 13. 如何從iPhone/Android獲取GPS座標?
- 14. 如何從GPS座標查找郵編?
- 15. 從Delphi登錄網站
- 16. 從ASP.NET網站登錄Sharepoint
- 17. Facebook登錄黑莓Webworks
- 18. 從Shopify自動登錄到php網站
- 19. 從桌面自動登錄到網站
- 20. 從黑莓手機看不到的網站
- 21. 從黑莓
- 22. 從GPS座標和本地時間到UTC 0(祖魯時間)
- 23. 從usb接口直接從黑莓(珍珠)獲取GPS數據
- 24. 登錄到網站
- 25. 從我的網站登錄到WordPress的網站
- 26. 從我的網站登錄到遠程網站
- 27. 從客戶端網站登錄到其他網站
- 28. 如何自動填寫並從外部登錄頁面登錄到網站?
- 29. 在黑莓中啓用GPS
- 30. 獲取通過GPS黑莓