1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    10
    Vote Rating
    0
    Answers
    1
    jayantpaliwal is on a distinguished road

      0  

    Default Answered: Google Maps not showing in iPhone and iPad, working only in desktop

    Answered: Google Maps not showing in iPhone and iPad, working only in desktop


    Hello Everybody,

    I am usign sencha Touch 2 and want to show simple Map using current location option to true. This code works fine in desktop browser but not in iPhone and iPad. I have iPhone 4S with iOS 6
    It display just a blank space when I check it in iPhone and iPad. Here is my code:
    Code:
      {               xtype: 'map',
                   useCurrentLocation: true,
                   layout: 'card',
                   title: 'Map',
                   iconCls: 'categories',
                   mapOptions: {
                        disableDefaultUI: true,
                        zoomControl: true,
                        zoom: 10
                       }
                       
                }

    Above code only works in iPhone and iPad when I set useCurrentLocation to false. It works fine in desktop browser. Am I missing anything or it is a BUG? Please help me.

    Thanks in advance.
    Jayant

  2. Yes, now I got the correct solution. Actually there was no issue with code. I am writing below steps to get popup in iPhone and iPad in case we not get it working.

    Go to Settings -> General -> Reset -> Reset Location & Privacy

    By this we will get the popup of allow/don't allow location. Once we allow, it will display location on map perfectly.

    Thanks

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,121
    Vote Rating
    453
    Answers
    3160
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    It's working on my iPhone with iOS6 with this code:

    Code:
    Ext.Viewport.add({
        xtype              : 'map',
        useCurrentLocation : true,
        layout             : 'card',
        title              : 'Map',
        iconCls            : 'categories',
        mapOptions         : {
            disableDefaultUI : true,
            zoomControl      : true,
            zoom             : 10
        }
    });
    Do you get the popup to allow location to be looked up?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

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

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    10
    Vote Rating
    0
    Answers
    1
    jayantpaliwal is on a distinguished road

      0  

    Default


    Yes, now I got the correct solution. Actually there was no issue with code. I am writing below steps to get popup in iPhone and iPad in case we not get it working.

    Go to Settings -> General -> Reset -> Reset Location & Privacy

    By this we will get the popup of allow/don't allow location. Once we allow, it will display location on map perfectly.

    Thanks

Tags for this Thread