Software Archive
Read-only legacy content
17061 Discussions

cordova-plugin-googlemaps doesn't work on Intel XDK

Ruslan_T_
Beginner
670 Views

When you actually build your app in Intel XDK, plugin works without any issues. 

But when you preview your app in Intel App Preview, you will see blank space instead of the map.

It doesn't matter what type of preview you use: USB, WiFi or Intel server.

Also when you try to debug an app after installing this plugin, you will get error while generating debug module.

 

0 Kudos
12 Replies
Amrita_C_Intel
Employee
670 Views

I would recommend you trying this sample app and test the behaviour of the maps. Here is the sample

https://github.com/gomobile/sample-html5-geolocation-map

You can access this sample directly from XDK under samples and demos.

Or you can try Hello Cordova sample as well. 

https://github.com/xmnboy/hello-cordova

0 Kudos
Ruslan_T_
Beginner
670 Views

Your example just uses Maps JavaScript API (maps for websites) inside an app.

cordova-plugin-googlemaps use Native Maps SDKs, which is completely different.

And why would I try Hello Cordova sample?

Sorry, but how your Hello World examples can help to run this plugin in Intel XDK?

0 Kudos
Amrita_C_Intel
Employee
670 Views

Ok! Can you send your .zip file of your project? 

0 Kudos
Ruslan_T_
Beginner
670 Views

Sure. 

I tested this configuration in Cordova and Phonegap separately and it works without issues.

As I said before it doesn't work in Intel XDK via App Preview or USB, but works after you actually build your project on Intel server and install to phone manually.

For this test I use Intel XDK 2807 (Linux) + Nexus 6 (stock) + iPhone 6 (stock)

I created project from 'Blank Template' and then added plugin to it.

Please note that I changed API_KEY_FOR_ANDROID and API_KEY_FOR_IOS to xxx, you have to change it to your real API Keys.

CAOCz8fvFcQ.jpg

0 Kudos
John_H_Intel2
Employee
670 Views

This plugin will not work in App Preview unless you build a debug module (in the debug tab). App Preview only contains a set of core plugins. You can see what these are if you launch AP and the do a 5 finger tap on the screen. This will bring up a list of all the built in plugins. If must use this version of the plugin, you most likely will need to build your app and test it on device.

0 Kudos
Ruslan_T_
Beginner
670 Views

As I said before, you can't debug an app after you add the plugin.

Screenshot from 2016-01-06 10-34-08.png

0 Kudos
PaulF_IntelCorp
Employee
670 Views

There are some plugins that cannot be built with the custom debug module. To get around that, you need to use remote CDT to debug on a real device. This will work with Android, but not iOS. For iOS you'll have to debug using weinre. Here are some links to help you:

That last bullet refers to debugging a Windows Phone app, but it applies to any mobile device. The bottom part of the article is the most important part. In the case of using weinre, you'll have to include the weinre script in your built app, to facilitate debugging, and then install and run the app on your iOS device.

0 Kudos
Maunash_J_
Beginner
670 Views

The Links to the Plugin:

GitHub: https://github.com/mapsplugin/cordova-plugin-googlemaps

npm: https://www.npmjs.com/package/cordova-plugin-googlemaps

There is a registry change for the plugin with stable and unstable versions on github (current master) and npm (version 1.3.9).

2.png

Follow the below plugin adding process it is working correctly:

1.png

Output of the plugin installed successfully:

3.png

 

 

0 Kudos
Andrea_P_1
New Contributor I
670 Views

Hello,

i'm using this plugin but while on Android there is no error, and the build is completed successfully on iOS i have a lot of this errors:

In file included from .../cordova_project/platforms/ios/Glance On Surface/Plugins/plugin.google.maps/Circle.m:9:
In file included from .../cordova_project/platforms/ios/Glance On Surface/Plugins/plugin.google.maps/Circle.h:9:
.../cordova_project/platforms/ios/Glance On Surface/Plugins/plugin.google.maps/GoogleMaps.h:10:9: fatal error: 'GoogleMaps/GoogleMaps.h' file not found
#import <GoogleMaps/GoogleMaps.h>
        ^

 

It seems that the iOS SDK is not "seen" by builder but the iOS SDK is installed:

I can provide you a full log if you need it

0 Kudos
PaulF_IntelCorp
Employee
670 Views

Andrea -- you appear to be using an old version of that Google Maps plugin. Install it using this ID > cordova-plugin-googlemaps < not > plugin.google.maps < using the third-party plugin option of the XDK.

As an alternative, you can use the JavaScript library, following the instructions in the article referenced by this FAQ > https://software.intel.com/en-us/xdk/faqs/general#google-maps-html5-cordova <

0 Kudos
Nikhil_G_
Beginner
670 Views

 

I'm working with Intel XDK and Ionic as framework the problem that i have is i'm trying to use google map and when i load the apk in the emulator it is working fine and on real device it is not working

0 Kudos
PaulF_IntelCorp
Employee
670 Views

Nikhil G. wrote:

I'm working with Intel XDK and Ionic as framework the problem that i have is i'm trying to use google map and when i load the apk in the emulator it is working fine and on real device it is not working

Please see this post > https://software.intel.com/en-us/forums/intel-xdk/topic/567619 <

0 Kudos
Reply