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

Awe.js with geolocation #3

Closed
silviuvert opened this issue Jun 7, 2014 · 6 comments
Closed

Awe.js with geolocation #3

silviuvert opened this issue Jun 7, 2014 · 6 comments

Comments

@silviuvert
Copy link

How do you display some Points of Interest (for which you have latitude, longitude and, optionally, altitude) using awe.js?

@buildar
Copy link
Owner

buildar commented Jun 10, 2014

First multiply the lat/lon values by some multiplier e.g. 100,000. Then just update the poi.s location using those values e.g.

  awe.pois.update({
    data: {
      position: {
        x: lat*100000,
        y: lon*100000,
      },
    },
    where: {
      id: 'my_poi',
    }
  });

Then just update the camera (point of view) position to be your devices lat/lon e.g.

  awe.povs.update({
    data:{
      position:{
        x: position.coords.latitude*100000,
        y: position.coords.longitude*100000,
      }
    },
    where:{
      id:"default"
    }
  });

In plain english you're basically saying "update the default camera setting it's x position to latitude and the y position to longitude".

And once you've made all your updates you need to call

  awe.scene_needs_rendering = 1;

This is because the rendering is optimised so the scene is only redrawn when you need to.

@buildar buildar closed this as completed Jun 10, 2014
@Caliqo
Copy link

Caliqo commented May 16, 2016

Hello! I am trying to make a geo-ar scenario using the geo-ar demo here on Github as a template. I have tried this code as many different way as I can think of, but I can not get it to work. The demo remains with the POIs being relative to the user. It doesn't seem to recognize the switch to fixed positions. Is there an example out there anywhere I can refer to? Thank you!

@sebi-b
Copy link

sebi-b commented Nov 4, 2016

Hey there! I'm also trying to figure out, how to display different locations using the longitude and latitude attribute. But as Caliqo wrote its not working.... Are there any other solutions? THanks!

@syc-pad
Copy link

syc-pad commented Jun 1, 2017

+1

@robman
Copy link
Collaborator

robman commented Jun 1, 2017

Hi @syc-pad this repos is deprecated so please raise any issues over on the new one (NOTE: This is covered in the README at the top of this repos).

There's a range of useful tips from the @awe-media team plus other users on different projection models for geolocation in issue #18.

Plus I'd recommend checking out the https://awe.media platform that provides a simple drag'n'drop interface for creating Locative AR and 360°/VR content.

@syc-pad
Copy link

syc-pad commented Jun 1, 2017

Thank you @robman ! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants