webOS Nation Forums > webOS apps and software > webOS development > GPS and open source wrapper
Member: whoisstan
at: 11:59 AM 07/10/2009
Hey

I am working on a wrapper library for GPS web access.

code.google.com/p/geo-location-javascript/

I would like to add webOS to the list of supported platforms, it looks fairly easy to do that in the webOS, but i don't have access to a SDK to develop taht part. Is that somebody interested in helping.

One question I got: Can I go to a website in the browser and use javascript to get GPS access or does this have to be an application? Either case, still want it.

Best,
Stan
Reply
Legend: Jason Robitaille
at: 12:15 PM 07/10/2009
Originally Posted by whoisstan:
One question I got: Can I go to a website in the browser and use javascript to get GPS access or does this have to be an application? Either case, still want it.
Pretty sure the system calls can be done in any javascript file, not just an app's one.
Reply
Member: sacherjj
at: 12:25 PM 07/10/2009
Unless you are running as an App started up on the device, I don't think you will have access to the Mojo.Services.Request to call on the palm:// bus. Otherwise, this is a glaring security hole for initiating Contact entries, Setting up emails for sending, etc.
Reply
Legend: Jason Robitaille
at: 12:48 PM 07/10/2009
Originally Posted by sacherjj:
Unless you are running as an App started up on the device, I don't think you will have access to the Mojo.Services.Request to call on the palm:// bus. Otherwise, this is a glaring security hole for initiating Contact entries, Setting up emails for sending, etc.
Lol, completely forgot about that. Though wouldn't simply having
Code:
<script src="file:///usr/palm/frameworks/mojo/mojo.js" type="text/javascript" x-mojo-version="1"></script>
get around that problem?
Reply
Member: sacherjj
at: 01:28 PM 07/10/2009
Using a relative path like that will reference the WEB SERVER, not local storage. This is a fundamental security principle for web browsers.
Reply
Member: whoisstan
at: 01:29 PM 07/10/2009
Is there a request for permission from the user when requesting the location? That way the security problem could be handled.

So I want to include that in the project, but don't know how since i can't get my hands on a Simulator and don't have a device. Where would i find Documnentation regarding that part of the API. Sorry for all those obvious questions, but i couldn't find a simulator or the API doc even with device already on the market??
Reply
Legend: Jason Robitaille
at: 02:17 PM 07/10/2009
Originally Posted by sacherjj:
Using a relative path like that will reference the WEB SERVER, not local storage. This is a fundamental security principle for web browsers.
lol, I need sleep. forgot "file://". That better?

Originally Posted by whoisstan:
So I want to include that in the project, but don't know how since i can't get my hands on a Simulator and don't have a device. Where would i find Documnentation regarding that part of the API. Sorry for all those obvious questions, but i couldn't find a simulator or the API doc even with device already on the market??
Full API and documentation is not released except privately in the Early Access Program, though I'd recommend trying webOS tutorials, forums and resources for developers
Reply
Member: sacherjj
at: 04:04 PM 07/10/2009
Originally Posted by Jason Robitaille:
lol, I need sleep. forgot "file://". That better?
Most browsers won't allow this unless you have a VERY lax security profile. Unless things have changed terribly since my last trying it a while ago.
Reply
Member: sacherjj
at: 04:06 PM 07/10/2009
Originally Posted by whoisstan:
Is there a request for permission from the user when requesting the location? That way the security problem could be handled.

So I want to include that in the project, but don't know how since i can't get my hands on a Simulator and don't have a device. Where would i find Documnentation regarding that part of the API. Sorry for all those obvious questions, but i couldn't find a simulator or the API doc even with device already on the market??
Do a search for the Leaked SDK. It has an emulator that allows you to load web sites. Unfortunately, you will get an error with a getCurrentPosition call. However, if you get that error, you know that you called into the right code.
Reply
Tagsgps, javascript

webOS Nation Forums > webOS apps and software > webOS development > GPS and open source wrapper