PokeGOAPI-Java icon indicating copy to clipboard operation
PokeGOAPI-Java copied to clipboard

GetMaps returns empty object?

Open JohnTendik opened this issue 10 years ago • 30 comments

Hey guys, I don't want to be a nuisance or anything but I'm having issues with the GetMaps method.

Everything works in the API including getinventory, getplayerprofile etc, except for getmap.

compile 'com.pokegoapi:PokeGOAPI-library:0.3.4'

Am I doing something wrong, did the API change at all? I tried waiting 5 seconds between requests, even at the initial request which seems excessive xD

Thanks in advanced, and thanks for all the hard work! :+1:

JohnTendik avatar Aug 08 '16 02:08 JohnTendik

Having same issue here, looks like API isn't updated yet.

Jazed avatar Aug 08 '16 02:08 Jazed

Hi had the same issue and I was using a google refresh token to login, I deleted it and refreshed login and now all works fine!

gionata-bisciari avatar Aug 08 '16 03:08 gionata-bisciari

nice!! I'm going to try that out and see if I get any results :o

JohnTendik avatar Aug 08 '16 03:08 JohnTendik

I hope Essert been helpful :)

gionata-bisciari avatar Aug 08 '16 03:08 gionata-bisciari

PTC doesn't work for me.

EDIT: Just tried Google and generated new token still returns 0, after calling it 5 seconds after authenticating.

go.getMap().getMapObjects().getPokestops().size()

Is it working for you guys? if so could you show your implementation? @gionata-bisciari

Jazed avatar Aug 08 '16 03:08 Jazed

I'am using google access like in readme example, then I simply set go.setLocation(lat, lon, alt) and finally I call go.getMap().getMapObjects().getPokestops()

gionata-bisciari avatar Aug 08 '16 04:08 gionata-bisciari

I'm doing the exact same using the latest repo clone. 0.0 yet returns 0.

Jazed avatar Aug 08 '16 04:08 Jazed

Did you cloned Development or master branch?

gionata-bisciari avatar Aug 08 '16 04:08 gionata-bisciari

I cloned the dev branch, I'll reclone it and retry.

Jazed avatar Aug 08 '16 04:08 Jazed

Let us know if it works

gionata-bisciari avatar Aug 08 '16 05:08 gionata-bisciari

I've re-cloned and it seems to be going better now, however what is the new alternative for OkHttpClient? It's giving me a red line and doesn't give any suggestions as to what I should import.

Jazed avatar Aug 08 '16 05:08 Jazed

Great. Why we need an alternative?

gionata-bisciari avatar Aug 08 '16 05:08 gionata-bisciari

EDIT: Got it, looks like I needed the "all" generated .jar instead of just the library.

Thanks for the help :)

Jazed avatar Aug 08 '16 05:08 Jazed

Im having the same issue using this line compile 'com.pokegoapi:PokeGOAPI-library:0.3.4' in the gradle... Nothing shows on get map even with a 5 second after log in...

DrBrad avatar Aug 08 '16 06:08 DrBrad

@DrBrad Try this:

git clone --recursive -b Development https://github.com/Grover-c13/PokeGOAPI-Java.git &&
cd PokeGOAPI-Java && ./gradlew build

Then the lib should be found in:

PokeGOAPI-Java\library\build\libs\PokeGOAPI-library-all-0.3.0.jar

Jazed avatar Aug 08 '16 06:08 Jazed

Alright ill try that but isn't the update 0.3.4?

DrBrad avatar Aug 08 '16 06:08 DrBrad

Well that's the version that builds from the Dev branch, so I wouldn't know if theres anything above that builds from it.

Jazed avatar Aug 08 '16 06:08 Jazed

What JDK is required for this because I'm getting this error...

Could not find tools.jar. Please check that /usr/lib/jvm/java-7-openjdk-amd64 contains a valid JDK installation.

DrBrad avatar Aug 08 '16 06:08 DrBrad

I had that error as well, you should google around and check for classpaths correctly. Was really annoying to fix.

Jazed avatar Aug 08 '16 06:08 Jazed

I'm gonna try JDK 8 then ill Google. Thank you for your help @Jazed

DrBrad avatar Aug 08 '16 06:08 DrBrad