Results 1 to 5 of 5

Thread: can't package app when using navigator.geolocation

  1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    52
    Answers
    4
    Vote Rating
    2
      0  

    Default can't package app when using navigator.geolocation

    Main.js:
    Code:
    Ext.define("GS.view.Main", {    extend: 'Ext.Container',
        config:
    	{
        },
    	
    	initialize: function()
    	{
    		navigator.geolocation.getCurrentPosition( function(position) { }, function(error) { }, { } );
    	}
    });
    When trying to build with sencha app build package, it doesn't work, and says undefined is not an object. Why?

  2. #2
    Sencha Premium Member akpotosufredrick's Avatar
    Join Date
    Jan 2011
    Posts
    68
    Answers
    4
    Vote Rating
    0
      0  

    Default

    Make sure your Google API link in the Index.html file is first and not after the micro... stuff.
    That should make it work

  3. #3
    Sencha User
    Join Date
    Jun 2012
    Posts
    52
    Answers
    4
    Vote Rating
    2
      0  

    Default

    Didn't work. Navigator.geolocation is supposed to be a standard part of W3's specification.

    http://dev.w3.org/geo/api/spec-source.html

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      0  

    Default

    Why not use Ext.device.Geolocation?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  5. #5
    Sencha Premium Member akpotosufredrick's Avatar
    Join Date
    Jan 2011
    Posts
    68
    Answers
    4
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    Why not use Ext.device.Geolocation?
    true u can only use navigator.geolocation when you r using Ext.device.Geolocation not Ext.util.Geoloaction

Tags for this Thread

Posting Permissions

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