angularjs - Google map is not working in Angular App -


below code of google map not working in live application using angularjs.locally working.but when upload live app not working there.how solve this?

index.html

<div class="item item-divider" style="font-size:18px;">                         <i class="icon ion-map"></i> &nbsp;                         <a ng-click="launchgooglemaps()">location map</a>                     </div> 

app.js

$scope.launchgooglemaps=function(){         var url = "http://maps.google.com/maps?ll="+$scope.temple.latitude+","+$scope.temple.longitude; intel.xdk.device.launchexternal(url);     } 

try this

$scope.launchgooglemaps=function(){     var url = "http://maps.google.com/maps?ll="+$scope.temple.latitude+","+$scope.temple.longitude;      document.addeventlistener("intel.xdk.device.ready",function(){         intel.xdk.device.launchexternal(url);         },false);  }  

this function works inside event handlers. can’t call whenever to. make sure have added intel xdk device plugin in app.

and last not least should add line in config.xml let app lunch external url: <access origin="*" />

ref: https://cordova.apache.org/docs/en/4.0.0/guide_appdev_whitelist_index.md.html


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -