久久久久久久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 - 如何打開原生谷歌地圖應(yīng)用程序

      Android Phonegap - How to Open Native Google Maps Application(Android Phonegap - 如何打開原生谷歌地圖應(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 - 如何打開原生谷歌地圖應(yīng)用程序的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我正在使用 Phonegap 開發(fā)一個(gè) Android 應(yīng)用程序,但無法弄清楚如何打開本地 Google 地圖應(yīng)用程序來顯示方向.我通過插入 URL 打開地圖沒有任何問題,但打開應(yīng)用程序讓我很難過.到目前為止,我只能在iOS平臺上找到Phonegap相關(guān)的開發(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)擊鏈接后,打開原生谷歌地圖應(yīng)用程序.如果設(shè)備上未安裝應(yī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)行方式完全相同,但顯然無法打開 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è)示例通過包含結(jié)束位置添加到第一個(gè)示例,盡管我無法弄清楚如何插入當(dāng)前位置.最重要的是,它仍然無法打開 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)的俯視圖),但再次沒有打開實(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); 
                        }
                    });
                }
                

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

                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>
                

                用戶可以選擇打開其設(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 - 如何打開原生谷歌地圖應(yīng)用程序的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(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(如何檢測位置提供者?GPS 或網(wǎng)絡(luò)提供商)
                Get current location during app launch(在應(yī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>
                          主站蜘蛛池模板: 夜夜操狠狠操 | 黄色高清网站 | 一区二区三区四区在线 | 久久精品国产77777蜜臀 | 久操福利视频 | 亚洲人高潮女人毛茸茸 | 免费的毛片 | 天天看天天操 | 国产三级视频在线播放 | 亚洲一区色| 国产福利视频在线观看 | 亚洲黄色小视频 | 中文日韩欧美 | 黄色天天影视 | 黄色激情网站 | 在线观看av的网站 | 在线日韩欧美 | 亚洲欧美一区二区三区四区 | 免费黄色小视频 | 91av免费观看 | 四虎官网 | 国产无精乱码一区二区三区 | 亚洲精品一二三四区 | 天天色小说 | 91久久精品日日躁夜夜躁欧美 | 毛片网站大全 | 欧美精品一区在线 | 日日夜夜av | 黄色一节片| 九九国产视频 | 久久精品一二三 | 亚洲网站在线观看 | 日韩成人免费 | 日韩精品一 | 国产欧美日本 | 久草小视频 | 久久久久成人网 | 免费一区二区三区 | 96久久 | 福利视频午夜 | 色婷婷婷 |