×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    4

    Lightbulb Announce: MWS GearsGeolocation extension

    Hi all,

    I've been playing around with MWS and implemented Google Gears Geolocation extension.
    Visit http://beta.mobilised.net/gears/index.html to download it and see it in action.

    Looking forward to feedback & comments

    Dean

  2. #2
    Regular Contributor
    Join Date
    Apr 2008
    Location
    Charlotte, NC, USA
    Posts
    79

    Re: Announce: MWS GearsGeolocation extension

    Looks neat; and dang near something that I was proposing to add to my MWS site earlier this week as part of a new template.

    A few questions:
    - how would one embed this into their MWS site?
    - the S60 Browser isn't Gears enabled, so how does this compensate for that (is that the 'show last location' feature)

    This is something that would defintely see an addition on my Presence page though.

    Very cool; great job.

    EDIT: ignore the first question, just downloade the ZIP, I'll figure that part out.
    http://antoinerjwright.com - an MWS hosted site

  3. #3
    Registered User
    Join Date
    Apr 2003
    Posts
    4

    Re: Announce: MWS GearsGeolocation extension

    re. your question 2:
    this actually makes your s60 Browser (almost) Gears enabled. I say 'almost' because Gears is not implemented as a browser plugin but instead emulates the Gears Geolocation environment in javascript/DOM backed by MWS-python JSON service.
    You could easily add a map functionality to the presence page but that's not the point of this. Instead, this allows a remote website to acquire your location using an interface proposed by Google Gears and serve location-aware content in your browser.

    Dean

  4. #4
    Nokia Developer Expert
    Join Date
    Sep 2007
    Posts
    60

    Re: Announce: MWS GearsGeolocation extension

    Quote Originally Posted by deanmas View Post
    Hi all,

    I've been playing around with MWS and implemented Google Gears Geolocation extension.
    Visit http://beta.mobilised.net/gears/index.html to download it and see it in action.

    Looking forward to feedback & comments

    Dean
    Could you still explain more simply how to test this on my own MWS? Dropping the gears.zip on the device doesn't do much as such? Also your test site doesn't seem to do anything?

  5. #5
    Registered User
    Join Date
    Apr 2003
    Posts
    4

    Re: Announce: MWS GearsGeolocation extension

    You need to unpack the zip into the 'htdocs' folder of your MWS install so you end up with
    Web Server/htdocs/gears/py/loc.py and
    Web Server/htdocs/gears/js/loc.js

    I'll try explain how it works:

    loc.py provides functionality similar to Location REST API except it is returned in JSONP format rather then XML. That allows your browser to talk directly to your server via Ajax-like calls, see http://ox.no/posts/ajast-cross-domai...json-injection

    loc.js contains the required Ajax logic and implements the Gears Location interface and methods, see http://code.google.com/apis/gears/api_geolocation.html

    Now the test page:
    Inspecting the source you'll find the following
    <script type="text/javascript" src="gears_init.js"></script> - which is the standard Gears init script. Loading the page in other Gears-enabled browsers (e.g. Chrome) should show you a map of your (IP based) estimated location.

    <script type="text/javascript" src="http://127.0.0.1/gears/js/loc.js"></script> - THIS IS THE KEY - if you installed gears.zip correctly and your MWS is running, loc.js will be loaded and will start talking to loc.py. After a few seconds it should show you a map of where you are using the exact same javascript methods that worked in Chrome, effectively making your S60 browser Gears enabled (at least for Location).

    Hope this makes sense.

    Dean

  6. #6
    Regular Contributor
    Join Date
    Apr 2008
    Location
    Charlotte, NC, USA
    Posts
    79

    Re: Announce: MWS GearsGeolocation extension

    Ok Dean;
    Here's my plaything: https://arjw.mymobilesite.net/index.html

    As you can see, your location shows, not mine. No clue why, maybe you can help debug that end and we can get something here that really works for a few folks.

    Also, where are you formatting that map image in your JS, its killin the asthetic side of me to have it not look like the Gallery block's image
    http://antoinerjwright.com - an MWS hosted site

Similar Threads

  1. WAP extension for Dreamweaver
    By RichardGalbraith in forum Mobile Web Site Development
    Replies: 4
    Last Post: 2010-07-11, 12:05
  2. Recording in Amr Format
    By losym in forum Symbian Media (Closed)
    Replies: 12
    Last Post: 2009-03-26, 06:41
  3. what 's mean of Extension_() in CSession Class
    By yinquan in forum Symbian C++
    Replies: 7
    Last Post: 2008-08-12, 16:52
  4. Light up MWS with Silverlight
    By hindermath in forum Mobile Web Server
    Replies: 0
    Last Post: 2008-03-30, 23:20
  5. RaccoonOnMap and MWS
    By talakosk in forum Mobile Web Server
    Replies: 0
    Last Post: 2007-06-27, 11:52

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •