Skip to content
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

Footer's buttons doesn't work for location based: negative latitude not working? #77

Open
thauska opened this issue Jun 17, 2020 · 9 comments · Fixed by #81
Open

Footer's buttons doesn't work for location based: negative latitude not working? #77

thauska opened this issue Jun 17, 2020 · 9 comments · Fixed by #81
Assignees
Labels
1.0.0 bug Something isn't working

Comments

@thauska
Copy link
Member

thauska commented Jun 17, 2020

I was testing location base page and the buttons for publishing and download the project seems not to work. I've tested on browser Firefox and Chrome.

@gciandro13
Copy link
Member

Hi @thauska , I tried on Chrome (Windows OS) and it seems that the buttons working properly -->
https://ar-js-org.github.io/studio/pages/location/index.html

My steps:

  • Added a location (by latitude/longitude);
  • Added a ".png" content.
    Then zip download package and github flows activated correctly.

How could I reproduce your problem?

@thauska
Copy link
Member Author

thauska commented Jun 18, 2020

I did the same steps and the buttons doesn't work. I tried on Chrome and Firefox (Linux Manjaro OS)

@nicolocarpignoli
Copy link
Member

@thauska please can you open the console dev tools, and see if there is problems ? If so, please share screenshot

@thauska
Copy link
Member Author

thauska commented Jun 18, 2020

Captura de tela_2020-06-18_10-05-19

@thauska
Copy link
Member Author

thauska commented Jun 18, 2020

screencapture-ar-js-org-github-io-studio-pages-location-index-html-2020-06-18-10_04_11

@gciandro13
Copy link
Member

gciandro13 commented Jun 18, 2020

@thauska
Using your location data, I reproduced the bug and see these errors on console:

components:gltf-model:warn Unexpected token < in JSON at position 0
three.js:2546 THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0

Seems that putting "Latitude" >0 solved it @nicolocarpignoli

@nicolocarpignoli
Copy link
Member

nicolocarpignoli commented Jun 18, 2020

components:gltf-model:warn Unexpected token < in JSON at position 0
three.js:2546 THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0

These above are problems related to the asset, but they're not the cause. I can reproduce the bug with a negative latitude, you're right. No error is shown on console.

I guess there is something related to the latitude when is negative. That should be fixed, latitude and longitude can be negative.

https://stackoverflow.com/questions/15965166/what-is-the-maximum-length-of-latitude-and-longitude#:~:text=7%20Answers&text=The%20valid%20range%20of%20latitude,of%20the%20Prime%20Meridian%2C%20respectively.

@nicolocarpignoli nicolocarpignoli changed the title Footer's buttons doesn't work for location base Footer's buttons doesn't work for location base: negative latitude not working? Jun 18, 2020
@nicolocarpignoli nicolocarpignoli changed the title Footer's buttons doesn't work for location base: negative latitude not working? Footer's buttons doesn't work for location based: negative latitude not working? Jun 18, 2020
@nicolocarpignoli nicolocarpignoli added bug Something isn't working 1.0.0 labels Jun 19, 2020
@thauska
Copy link
Member Author

thauska commented Oct 28, 2020

image
The bug persist.

Latitude: -1.409180
Longitude: -48.468201

@thauska thauska reopened this Oct 28, 2020
@gciandro13
Copy link
Member

Yes I reproduced the bug. No error on console.
It's strange because with lng <0 it works. We have to debug it.

let validLat = !isNaN(lat) && lat >= -90 && lat <= 90;
let validLng = !isNaN(lng) && lng >= -180 && lng <= 180;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0.0 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants