leo
Posts: 0
Joined: Sat Oct 18, 2014 1:43 pm

Implement a phonegap compass script

Hi!

I found the perfect solution for my project in an stackoverflow topic.

It is a phonegap compass script/plugin. Here is the script: http://stackoverflow.com/a/13780468

The problem is that I have a hard time trying to implement this script. I have tried all several ways, but it just doesnt work. It only shows the body html with no data from the compass.

  1. First, I tried to implement the whole script in a html component. Didnt work.

  2. Then, I tried to implement only the body section in the html component, and upload the js and css files in the assets (Create new button). And run the the javascript in the javascript api on DeviceReady event. Didnt work.

    What am I doing wrong?

    Would be very grateful for a step by step tutorial.

    ps. I tried the app on an android device.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Implement a phonegap compass script

Hi Leo,

This is HTML implementation.

You can just do following:

  1. Create new page.

  2. Set this page in as start page.

  3. Navigate to source tab.

  4. Find your page html.

  5. Click and edit this page.

  6. Insert whole HTML from that example.

    Regards.

leo
Posts: 0
Joined: Sat Oct 18, 2014 1:43 pm

Implement a phonegap compass script

Thanks yurii,

But are there any way to implement this without changing in the source tab.

Because I am using Jquery multi page template.

Or Any other way, could you build a page that is not in the multipage template, and keep the other pages in the multi page template?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Implement a phonegap compass script

Do you mean to edit page created from template?
You can do it by breaking template for this current page. Choose page and click Break apart page template in Properties.

Return to “Issues”