Results 1 to 5 of 5

Thread: Google Map control error - Cannot read property 'ZoomControlStyle' of undefined ?

  1. #1
    Sencha User
    Join Date
    Nov 2013
    Posts
    49
    Answers
    1

    Default Answered: Google Map control error - Cannot read property 'ZoomControlStyle' of undefined ?

    I'm using google map control to get the map view related to my address.

    I am getting this error "Cannot read property 'ZoomControlStyle' of undefined " at below code.


    The following classes are not declared even if their files have been loaded:


    {
    layout: 'fit',
    xtype: 'map',
    //map : google.maps.Map,
    mapOptions: {
    zoom : 16,
    panControl: false,
    zoomControl: true,
    scaleControl: true,
    streetViewControl: false,
    zoomControlOptions: {
    style: google.maps.ZoomControlStyle.SMALL,
    position: google.maps.ControlPosition.LEFT_BOTTOM
    }
    },
    }


    what's wrong here please help me.

  2. Yes this will happen if the google maps api does not load. There are quite a few posts on the forums and web on strategies on how to deal with this.
    http://www.sencha.com/forum/showthread.php?252921
    http://www.sencha.com/forum/showthre...l=1#post822430
    http://thingsico.de/blog/2011/11/usi...y-in-phonegap/

  3. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    Hard to tell from the information you have provided. I was able to use the config without any issue. Did you include the script tag to the google maps api in your index.html? What version of Touch are you experiencing this issue?
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

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

    Need to include a test case use:
    The official Sencha Fiddle

  4. #3
    Sencha User
    Join Date
    Nov 2013
    Posts
    49
    Answers
    1

    Default HI fmoseley

    I'm using touch 2.2.1 version, i added the script tags in index.html also.

    My issue is when Internet network not there my app homepage not loading... only when internet there then only app homepage loading.

    No-Internet
    1) App not loading.
    2) If i removed/commented the zoomControl tag then app loading on No-internet.
    a) same thing map not loading due to commenting the zoomCOntrols when Internet available.

    On home page, click of goto map button then my map view will start.

    if you have any code snippet please share.

    Advance Thanks!!

  5. #4
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    Yes this will happen if the google maps api does not load. There are quite a few posts on the forums and web on strategies on how to deal with this.
    http://www.sencha.com/forum/showthread.php?252921
    http://www.sencha.com/forum/showthre...l=1#post822430
    http://thingsico.de/blog/2011/11/usi...y-in-phonegap/
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

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

    Need to include a test case use:
    The official Sencha Fiddle

  6. #5
    Sencha User
    Join Date
    Nov 2013
    Posts
    49
    Answers
    1

    Default Thank you so much fmoseley.

    Let me try with this.

Posting Permissions

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