Closed Encanis closed 9 years ago
I think there is error message in Logcat, or your javascript code is dropped something.
Hello, if i am trying to run the side in Eclipse LogCat isnt printing out any error messages. If i however start the project in the browser and start debugging it with F12 i am getting like 200000 errors with the content: cant process invalid message "". Then i tried to run your DemoApp and i am getting this errors:
That's just jquery error. Ignore it.
Please show me the whole error log.
On Wed, Feb 18, 2015, 10:39 PM Encanis notifications@github.com wrote:
Hello, if i am trying to run the side in Eclipse LogCat isnt printing out any error messages. If i however start the project in the browser and start debugging it with F12 i am getting like 200000 errors with the content: cant process invalid message "". Then i tried to run your DemoApp and i am getting this errors: [image: errormsg] https://cloud.githubusercontent.com/assets/11065795/6262775/6b3871ba-b80a-11e4-9d7f-f9ceba10da6f.png
— Reply to this email directly or view it on GitHub https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues/408#issuecomment-75005656 .
LogCat is dishing out way to many lines so that i could screenshot them all so i decided to save the error log into a textfile and upload it. I hope this is fine for you? Here is the link to the uploaded document you should be able to copy it from there: http://m.uploadedit.com/ba3a/142437578292.txt If you would rather prefer sceenshots tho or any other way how i could provide you the information i would gladly do it as well!
@Encanis Thanks for your log. In the log, I found these lines:
D/CordovaLog(13351): file:///android_asset/www/js/example.js: Line 23 : Uncaught TypeError: Cannot read property 'maps' of undefined
E/Web Console(13351): Uncaught TypeError: Cannot read property 'maps' of undefined at file:///android_asset/www/js/example.js:23
This means there is incorrect in your js/example.js at line 23.
I guess you use my js/example.js https://github.com/wf9a5m75/phonegap-googlemaps-plugin/blob/master/example/DemoApp/www/js/example.js#L23
But you use the tutorial HTML. https://github.com/wf9a5m75/phonegap-googlemaps-plugin/wiki/Tutorial-for-Mac#6-change-the-wwwindexhtml
That's the reason.
And I think you don't install this plugin correctly. If you install this plugin correctly, the plugin outputs the following message.
This app uses phonegap-googlemaps-plugin version 1.2.4
But I cannot see the message in your log.
I also noticed that your screen capture shows chrome on Windows, but this plugin works only Android or iOS.
HI,.
for me also same error.map not loading in my android device. i have installed the plugin correctly but it does not enters into mapready getmap,isavailble var map; document.addEventListener("deviceready", function() {
plugin.google.maps.Map.isAvailable(function(isAvailable, message) {
alert("avaible");
if (isAvailable) {
var map = plugin.google.maps.Map.getMap();
map.addEventListener(plugin.google.maps.event.MAP_READY, onMapInit);
} else {
alert(message);
}
}); }, false);
Yeah i couldnt get it to run when only using $> adb install phonegap-googlemaps-plugin-v1.2.4.apk ,it allways told me that i have an invalide apk file. Do you know how to fix this? I just followed the steps from this link to get it running https://github.com/wf9a5m75/phonegap-googlemaps-plugin/wiki/Tutorial-for-Windows. And i would have a last question remaining. As fare as i noticed you are using google maps v2api? is there a way how i could get the v3 api running using your plugin?
HI,.
for me also same error.map not loading in my android device. i have installed the plugin correctly.
Ok, Google Maps Android API v2 works over Android 2.3 though, Google Maps framework is also required.
If your phone doesn't have Google Play Store, this plugin doesn't work.
HI i am having google play store.i am able to run your sample apk.it works fine.but in my code map is not loading.
@sangariv, could you show me the whole error log?
i am running the app in command line .shall i sent you the pjt
Could you show me the logcat log?
On Fri, Feb 20, 2015, 7:19 AM sangariv notifications@github.com wrote:
i am running the app in command line
— Reply to this email directly or view it on GitHub https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues/408#issuecomment-75254525 .
I am not able to take the logcat now.My api key is "AIzaSyAipr8g5OBGDe5GuufmFDuMPRtlZpLScI4" can u plesae check and tell.
How do i install the project using the apk file? I just download it and than i run the console command that i posted earlier?
@sangariv Without logcat error log, I can not support you. How to obtain it, please googling.
@Encanis did you install this plugin using cordova command?
Yes i did. I used your tutorial for windows to do it.
@Encanis
What cordova version do you use?
Could you show me the result of $ > cordova plugin list
?
On Fri, Feb 20, 2015, 8:25 AM Encanis notifications@github.com wrote:
Yes i did
— Reply to this email directly or view it on GitHub https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues/408#issuecomment-75266481 .
Her is a screenshot of my cmd:
I am not entirly sure what cordova version i am using(guessing it is 4.0.0). Is there any way i can check to make sure?
Edit: Okey after i run "npm info cordova version" it tells me it is 4.2.0
@Encanis It seems you are missing 'com.google.playservices' plugin. In order to install that, type:
$> cordova plugin add https://github.com/wf9a5m75/google-play-services
The way to know the version of Cordova, type:
$> cordova --version
Other available commands:
$> cordova --help
Okey thanks so i am using cordova 4.2. But i still couldnt fix the problem where it loads the wrong .js i still get that error. All i did was copie past the www folder of the DemoApp and replace the original www folder of the project with it. do i have to redirect the links that point to the .js?
Did you install the com.google.playservices
library?
Post again:
It seems you are missing 'com.google.playservices' plugin. In order to install that, type:
$> cordova plugin add https://github.com/wf9a5m75/google-play-services
Yes i did install it. Edit: Okey w8 a second. I did use your line you posted $> cordova plugin add https://github.com/wf9a5m75/google-play-services but for some reason it wont show up when i look at the installed plugins. So i did try to install it but it didnt work for some reason.
Okey i looked a bit closer on the console log and it tells me Error: "git" command line tool is not installed: make sure it is accessible on your PATH. How can i fix this error?
Please install git command https://www.youtube.com/watch?v=albr1o7Z1nw
Or just install github for window. This is the easiest way. https://windows.github.com/
Okey, thanks. I just installed Github but the Error is still existing do i need to add my folder to Github or do something else to get it running?
Open your command prompt, then type $> git --version
.
Does this work?
no, it says the git is either written wrong or no existing. Do you think restarting the computer would help?
I think so.
I just restarted my computer, but it didn't change anything. It still says that "git" is either written wrong or none existing
Ok, in this case, download the plugin from here. https://github.com/wf9a5m75/google-play-services/archive/master.zip
Extract it, then install from local.
$> cd (your project)
$> cordova plugin add c:/....../google-play-services/
For your future, I recommend you study about git.
Thanks you, i will be looking into it. However if i do it the way you just explained to me i still get an error that looks like this
$> dir C:\PluginMaturaprojekt\google-play-services
and
$> dir C:\PluginMaturaprojekt\google-play-services\google-play-services
If i run both of the lines it tells me ethat the file couldnt be found.
I just want to know where the plugin.xml is located.
Okey i screenshotted the cmd, it is german but i think you should still be able to understand what it says: "Datei nicht gefunden" means file not found. And "Das System kann die angegebende Datei nicht finden" means "The system cant find the stated file.
ok, forget about it.
try this way:
$> cordova plugin add com.google.playservices
Okey, thanks it added the plugin now! However it still didnt fix the problem that it cant read the prpoerty 'maps' of undefined in the line 23 of the example.js
So do you see the map now?
No i sadly dont.
Before using example.js, use simple javascript.
1) Replace www/index.html with this https://github.com/wf9a5m75/phonegap-googlemaps-plugin/wiki/Tutorial-for-Mac#6-change-the-wwwindexhtml
2) then type following commands:
$> npm -g install ios-sim ios-deploy // only at once
$> cordova prepare
$> cordova build ios
$> cordova run ios
Okey i used the index.html code from the link and replaced it with mine. all i did was switching up ios with android since my device is a android device. However the map still wont load up. And if i run the first command like this: npm -g install android-sim android-deploy i get some errors that looks like this:
Oh, oops, you use Windows. You can not use iOS.
Hello, first off all thanks for the Plugin, but sadly the map isnt loading for me. I followed all the steps you had in your toturial to set up the first projekt but sadly the map isnt showing up. Do you know where the problem could be? The buttons and everything else is loading fine. It looks like this: