-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getmap initialization issue #434
Comments
I tested your code, but the issue is not reproduced. |
Which version did you test against? I'm using cordova 4.2 with the release version of the plugin. |
Ok, I confirmed your issue, but it is already fixed in the test branch. In order to use the test branch, install git command, then
|
Thank you very much for your attention to this. |
This issue still exists with the latest version 1.3.1 (tested on Android, samsung s4) Everything worked perfectly invoking var options = {
camera: {
latLng: latLongs // an array of LatLng objects
}
};
plugin.google.maps.Map.getMap(options); |
@bradmarder yes, because getMap need a specified container The first argument of getMap can not be an object. var div = document.getElementById("map");
var map;
var options = {
camera: {
latLng: latLongs // an array of LatLng objects
}
};
// Initialize the map view
map = plugin.google.maps.Map.getMap(div, options); |
The bug still exists:
plugin.google.maps 1.3.9 "phonegap-googlemaps-plugin" |
I ran into this issue but for my case I defined my API_KEY metadata in the wrong section in the android manifest file
Make sure these two entries is within the tags inside android manifest and not outside of it. Having it outside or not at all will get the error 'getMap' is not defined in GoogleMaps plugin. The plugin gives a popup warning if API_KEY is not equal to API_KEY_FOR_ANDROID, but perhaps it should check for null or empty API_KEY as well and pop up an appropriate message. For my case my API_KEY is null. Try to put a breakpoint at line 432 to see if you are able to get the API_KEY, if you can then it is a different issue already. Hope this helps someone. |
Would someone please update this tutorial example? It seems to initialize getMap() with the options and is missing the DOM element just like what is seen in |
Greetings,
I have been utilizing the map plugin successfully, and have started playing with options. with getmap()
The map will not appear and will generate an error
03-07 11:01:53.327: D/CordovaLog(7935): file:///android_asset/www/plugins/plugin.google.maps/www/googlemaps-cdv-plugin.js: Line 115 : 'getMap' is not defined in GoogleMaps plugin.
If I remove the 'camera' : { 'zoom': 15} option, then the map will appear, which is easy enough, however I would like to know if I'm doing something wrong.
Am I allowed to initialize the camera in the getMap() or do I have to do that after the MAP_READY has fired?
The text was updated successfully, but these errors were encountered: