久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<i id='mkvcN'><tr id='mkvcN'><dt id='mkvcN'><q id='mkvcN'><span id='mkvcN'><b id='mkvcN'><form id='mkvcN'><ins id='mkvcN'></ins><ul id='mkvcN'></ul><sub id='mkvcN'></sub></form><legend id='mkvcN'></legend><bdo id='mkvcN'><pre id='mkvcN'><center id='mkvcN'></center></pre></bdo></b><th id='mkvcN'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='mkvcN'><tfoot id='mkvcN'></tfoot><dl id='mkvcN'><fieldset id='mkvcN'></fieldset></dl></div>

  1. <legend id='mkvcN'><style id='mkvcN'><dir id='mkvcN'><q id='mkvcN'></q></dir></style></legend>
  2. <small id='mkvcN'></small><noframes id='mkvcN'>

    • <bdo id='mkvcN'></bdo><ul id='mkvcN'></ul>
    <tfoot id='mkvcN'></tfoot>

      Android Phonegap - 如何打開(kāi)原生谷歌地圖應(yīng)用程序

      Android Phonegap - How to Open Native Google Maps Application(Android Phonegap - 如何打開(kāi)原生谷歌地圖應(yīng)用程序)

          <tfoot id='atvTJ'></tfoot>
            <bdo id='atvTJ'></bdo><ul id='atvTJ'></ul>

            <small id='atvTJ'></small><noframes id='atvTJ'>

              <tbody id='atvTJ'></tbody>

              <legend id='atvTJ'><style id='atvTJ'><dir id='atvTJ'><q id='atvTJ'></q></dir></style></legend>
              • <i id='atvTJ'><tr id='atvTJ'><dt id='atvTJ'><q id='atvTJ'><span id='atvTJ'><b id='atvTJ'><form id='atvTJ'><ins id='atvTJ'></ins><ul id='atvTJ'></ul><sub id='atvTJ'></sub></form><legend id='atvTJ'></legend><bdo id='atvTJ'><pre id='atvTJ'><center id='atvTJ'></center></pre></bdo></b><th id='atvTJ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='atvTJ'><tfoot id='atvTJ'></tfoot><dl id='atvTJ'><fieldset id='atvTJ'></fieldset></dl></div>
                本文介紹了Android Phonegap - 如何打開(kāi)原生谷歌地圖應(yīng)用程序的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                問(wèn)題描述

                我正在使用 Phonegap 開(kāi)發(fā)一個(gè) Android 應(yīng)用程序,但無(wú)法弄清楚如何打開(kāi)本地 Google 地圖應(yīng)用程序來(lái)顯示方向.我通過(guò)插入 URL 打開(kāi)地圖沒(méi)有任何問(wèn)題,但打開(kāi)應(yīng)用程序讓我很難過(guò).到目前為止,我只能在iOS平臺(tái)上找到Phonegap相關(guān)的開(kāi)發(fā)建議.

                I'm working on an Android application using Phonegap and am having trouble figuring out how to open the native Google Maps application to display directions. I don't have any issue opening a map by inserting a URL but opening the application has me stumped. So far I have only been able to find Phonegap related suggestions for development on the iOS platform.

                我已將 Google 地圖添加到白名單權(quán)限,在我的腳本標(biāo)記中包含正確的 Cordova.js 文件和 google 地圖鏈接,在我的 AndroidManifest.xml 文件中具有正確的權(quán)限,包含 Cordova.jar 和 Google Map API我的構(gòu)建路徑,res目錄下有Phonegap xml文件夾,我的assets/www目錄下有js文件,libs目錄下有jar文件.

                I have added Google Maps to the whitelist permissions, am including the correct Cordova.js file and google maps link in my script tag, have the correct permissions in my AndroidManifest.xml file, included Cordova.jar and Google Map API in my build path, have the Phonegap xml folder in the res directory, js file in my assets/www directory, jar file in the libs directory.

                我想要完成的事情:

                What I am trying to accomplish:

                  1. 點(diǎn)擊鏈接后,打開(kāi)原生谷歌地圖應(yīng)用程序.如果設(shè)備上未安裝應(yīng)用程序,請(qǐng)通知用戶未安裝 Google 地圖,必須安裝.
                    一個(gè).我已經(jīng)在檢查網(wǎng)絡(luò)連接并按照應(yīng)有的方式進(jìn)行處理.
                  1. When a link is clicked, open the native Google Maps application. If the application is not installed on the device, notify the user that Google Maps is not installed and must be installed.
                    a. I am already checking for network connectivity and handling that as it should be done.

                以下示例在我的 Android 設(shè)備上的運(yùn)行與在 iOS 上的運(yùn)行方式完全相同,但顯然無(wú)法打開(kāi) Google 地圖應(yīng)用程序的操作.

                The example below works on my Android device exactly the same as it does on iOS but obviously does not open the actions Google Maps application.

                <a> href="http://maps.google.com/maps?q=TD Washington DC"><img src="img/ico_pin.png" />White House</a></a>
                

                第二個(gè)示例通過(guò)包含結(jié)束位置添加到第一個(gè)示例,盡管我無(wú)法弄清楚如何插入當(dāng)前位置.最重要的是,它仍然無(wú)法打開(kāi) Google 地圖應(yīng)用程序.

                The second example adds on to the first by including the end location although I wasn't able to figure out how to insert the current location. Most importantly though, it still doesn't open the Google Maps application.

                <a href="javascript:openMaps('daddr=1600+Pennsylvania+Ave+NW+Washington+DC+20500+USA');"><img src="img/ico_pin.png" />White House</a>
                
                function openMaps(querystring) {
                    var maproot = '';
                    maproot = 'http://maps.google.com/maps?saddr=Current+Location&';
                    window.location = maproot + querystring;
                }
                

                在下面的第三個(gè)示例中,我能夠在我的應(yīng)用程序中顯示地圖.它確實(shí)顯示了正確的路線(從 A 點(diǎn)到 B 點(diǎn)的俯視圖),但再次沒(méi)有打開(kāi)實(shí)際的 Google Maps 應(yīng)用程序.

                In the third example below, I'm able to display a map within my application. It does show the correct route (from an overhead view from point A to point B) but again doesn't open the actual Google Maps application.

                <a id="whDirections" href="#mm_directions" onclick="getDirections()">
                                    <img src="img/ico_pin.png" />White House</a>
                
                <div data-role="content">
                    <div class="ui-bar-c ui-corner-all ui-shadow" style="padding: 1em;">
                        <div id="mapdirections_canvas" style="height: 300px;"></div>
                    </div>
                </div>
                
                function getDirections() {
                    var directionsService = new google.maps.DirectionsService();
                    var map;
                    var directionsDisplay = new google.maps.DirectionsRenderer();
                    var mapOptions = {
                        zoom: 9,
                        zoomControl: true,
                        mapTypeId: google.maps.MapTypeId.ROADMAP
                    };
                    var map = new google.maps.Map(document.getElementById("mapdirections_canvas"), mapOptions);
                    directionsDisplay.setMap(map);
                
                    var myLatLng = new google.maps.LatLng(gmmLat, gmmLong);
                    if (document.getElementById("whDirections")) {
                        var request = {
                            origin: myLatLng,
                        destination: new google.maps.LatLng(38.897096, -77.036545), 
                            travelMode: google.maps.TravelMode.DRIVING
                    };
                    directionsService.route(request, function(result, status) {
                        if (status == google.maps.DirectionsStatus.OK) {
                            directionsDisplay.setDirections(result); 
                        }
                    });
                }
                

                如果有人對(duì)此有鏈接或任何想法,我將非常感謝您的幫助.除了Hello World"應(yīng)用程序,這是我的第一個(gè)移動(dòng)應(yīng)用程序.請(qǐng)讓我知道我是否遺漏了任何內(nèi)容,或者我只是做錯(cuò)了.如果需要任何其他信息,請(qǐng)告訴我.

                If anyone has a link or any idea on this, I would really appreciate the help. Other than a 'Hello World' app, this is my first mobile application. Please let me know if I have missed anything or if I am just doing this completely wrong. If any additional information is needed, please let me know.

                提前感謝您的幫助.

                推薦答案

                使用地理:輸入 uri.

                Use the geo: type uri.

                <a href="geo:38.897096,-77.036545">open map</a>
                

                用戶可以選擇打開(kāi)其設(shè)備上安裝的任何地圖應(yīng)用程序.

                and the user will get the choice of opening any of the mapping applications installed on their device.

                這篇關(guān)于Android Phonegap - 如何打開(kāi)原生谷歌地圖應(yīng)用程序的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                Help calculating X and Y from Latitude and Longitude in iPhone(幫助從 iPhone 中的緯度和經(jīng)度計(jì)算 X 和 Y)
                Get user#39;s current location using GPS(使用 GPS 獲取用戶的當(dāng)前位置)
                IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                How reliable is LocationManager#39;s getLastKnownLocation and how often is it updated?(LocationManager 的 getLastKnownLocation 有多可靠,多久更新一次?)
                How to detect Location Provider ? GPS or Network Provider(如何檢測(cè)位置提供者?GPS 或網(wǎng)絡(luò)提供商)
                Get current location during app launch(在應(yīng)用啟動(dòng)期間獲取當(dāng)前位置)

              • <legend id='TGAwR'><style id='TGAwR'><dir id='TGAwR'><q id='TGAwR'></q></dir></style></legend>

                  <small id='TGAwR'></small><noframes id='TGAwR'>

                  <tfoot id='TGAwR'></tfoot>
                    <tbody id='TGAwR'></tbody>

                  • <i id='TGAwR'><tr id='TGAwR'><dt id='TGAwR'><q id='TGAwR'><span id='TGAwR'><b id='TGAwR'><form id='TGAwR'><ins id='TGAwR'></ins><ul id='TGAwR'></ul><sub id='TGAwR'></sub></form><legend id='TGAwR'></legend><bdo id='TGAwR'><pre id='TGAwR'><center id='TGAwR'></center></pre></bdo></b><th id='TGAwR'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='TGAwR'><tfoot id='TGAwR'></tfoot><dl id='TGAwR'><fieldset id='TGAwR'></fieldset></dl></div>

                          <bdo id='TGAwR'></bdo><ul id='TGAwR'></ul>
                          主站蜘蛛池模板: 日韩欧美一二三区 | 久久久久久91香蕉国产 | 日韩不卡一区二区三区 | 99久久99久久精品国产片果冰 | 中文字幕一区二区三区四区 | 人人澡视频 | 999观看免费高清www | 久久亚洲国产 | 农村真人裸体丰满少妇毛片 | 在线视频一区二区三区 | 国产精品不卡视频 | 成人激情视频免费观看 | 国产综合网址 | 国产精品久久久久久婷婷天堂 | 亚洲一二三区精品 | 成人免费视频网站在线看 | 不卡在线视频 | 91精品国产综合久久久久久丝袜 | 免费亚洲网站 | 日韩精品一区二区三区中文在线 | 亚洲国产日韩一区 | 亚州一区二区三区 | 特级做a爱片免费69 精品国产鲁一鲁一区二区张丽 | 蜜桃一区二区三区 | va在线| 在线观看中文字幕视频 | 天天天天操 | 久久av网站| 日韩欧美亚洲 | 一区二区三区免费网站 | 成人精品视频99在线观看免费 | 国产95在线 | 毛色毛片免费看 | 一区二区三区日韩精品 | 国产精品久久久久久久7电影 | 免费av在线 | 久久久久久久久国产精品 | 久久亚洲一区二区 | 精品中文字幕视频 | 男人的天堂中文字幕 | 国产福利视频 |