Reputation: 1280
I am working on a Cordova application and intend to use google maps, as per my understanding and the ionic maps starter example. We use maps api key for web and load the maps.
Doubtful about
1- Since it will be packaged in apk so I cannot restrict the api key to a specific domain. This doesn't look so good in terms of security.
2- The app will be installed in devices and each of these will have the maps api key inside application, what if I have to change this api key in future?
If someone has already faced such challenges please suggest.
Thanks
Upvotes: 1
Views: 1298
Reputation:
While Using cordova you don't require any API key for google maps to show it in webview
EDIT
Just remove the API key field
<script src="https://maps.googleapis.com/maps/api/js key=AIzaSyB16sGmIekuGIvYOfNoW9T44377IU2d2Es&sensor=true"></script>
like this
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
Upvotes: 3