studio icon indicating copy to clipboard operation
studio copied to clipboard

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

Open thauska opened this issue 5 years ago • 9 comments

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.

thauska avatar Jun 17 '20 17:06 thauska

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?

gciandro13 avatar Jun 18 '20 09:06 gciandro13

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

thauska avatar Jun 18 '20 12:06 thauska

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

nicolocarpignoli avatar Jun 18 '20 12:06 nicolocarpignoli

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

thauska avatar Jun 18 '20 14:06 thauska

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

thauska avatar Jun 18 '20 14:06 thauska

@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

gciandro13 avatar Jun 18 '20 15:06 gciandro13

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 avatar Jun 18 '20 15:06 nicolocarpignoli

image The bug persist.

Latitude: -1.409180 Longitude: -48.468201

thauska avatar Oct 28 '20 13:10 thauska

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;

gciandro13 avatar Oct 29 '20 15:10 gciandro13