AR-js-org / AR.js

Image tracking, Location Based AR, Marker tracking. All on the Web.
MIT License
5.4k stars 922 forks source link

Problem with ar.js location based in angular #99

Open gemece opened 4 years ago

gemece commented 4 years ago

Do you want to request a feature or report a bug? bug

What is the current behavior? Steps to reproduce the behavior:

    1. I had created a new project angular
     2. I installed libraries aframe with npm 
    "npm install aframe"
     3. I imported the libraries in index.html
     4. In the file polyfills.ts i imported aframe;
      5. In src/app/app.component.html i put 
      the code

Please mention other relevant information such as the browser version, Operating System and Device Name

What is the expected behavior? I hope the marker appears in the gps position but the marker doesn t appear

Screenshots This is index.html: indexhtml

This is app.component.html: appcomponenthtml

This is module.ts: modulets

This is pollyfils.ts pollyfilsts

Additional context I hope somebody can help me please. Thanks for the help. I dont know why this doesn't works. i'm looking for information on internet but i didn't find anything.

kalwalt commented 4 years ago

Hi @gemece I don't know if this can help you but i did this code with React https://github.com/kalwalt/react-AR-experiments/tree/master/react-aframe-ar and this https://github.com/kalwalt/react-aframe-ar-test Not angular but at least a similar approach. Because AR.js can not be directly imported as a module we should use these workarounds. I see also in your code some old link to the old repo, I don'think that cause the issue but maybe better to fix these.