Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Google Maps Error

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Sep 2008
    Posts
    157

    Default Google Maps Error

    Hi,
    staring from empty modern project,
    then i added Google Maps resource and on preview errors appear.

    On Chrome console:
    - You have included the Google Maps API multiple times on this page. This may cause unexpected errors.
    - Google Maps API error: MissingKeyMapError

    Code:
    Ext.define('Maps.view.MyMap', {    extend: 'Ext.ux.google.Map',    alias: 'widget.mymap',
        requires: [        'Maps.view.MyMapViewModel'    ],
        viewModel: {        type: 'mymap'    }
    });

    Luca


    version: 4.0.2.209
    channel: 4.0-stable
    platform: 1.2.3.16 - darwin x64
    cmd: 6.2.0.103
    framework: Ext JS 6.2.x Modern

  2. #2

    Default

    Google Map component in modern toolkit is fixed in just released 4.1 EA.

  3. #3
    Sencha User
    Join Date
    Sep 2014
    Location
    Central Europe
    Posts
    795

    Default

    Hello

    There is also a bug in the ExtJS framework which is not yet fixed.
    - You have included the Google Maps API multiple times on this page. This may cause unexpected errors.
    Remove the GoogleMapsAPI from the resources in the SA.

    If you encounter issue where it says that your google API key is invalid. You have to override / edit the framework file.
    http://docs.sencha.com/extjs/6.2.0/m....ux.google.Map

    Regards
    Petr

  4. #4
    Ext JS Premium Member
    Join Date
    Sep 2008
    Posts
    157

    Default

    well, but...
    after several attempts still not reached me yet any email to download EA 4.1.
    Am i doing something wrong?
    Thanks,
    Luca

  5. #5
    Sencha Premium Member richardvd's Avatar
    Join Date
    Jun 2011
    Location
    NL
    Posts
    255

    Default

    Override for adding your Google Maps API key to the URL in Ext JS 6.2.0 (from this thread):

    Quote Originally Posted by richardvd View Post
    Code:
    Ext.define('Override.mixin.Mashup', {
        override: 'Ext.mixin.Mashup',
        
        onClassMixedIn: function (targetClass) {
            if (targetClass.$className === 'Ext.ux.google.Map') {
                targetClass.prototype.requiredScripts = [
                    '//maps.googleapis.com/maps/api/js?key=MY_APIKEY'
                ]
            }
            this.callParent([targetClass]);
        } 
    });

  6. #6
    Ext JS Premium Member
    Join Date
    Sep 2008
    Posts
    157

    Default

    SA 4.1.0.91.... still has the problem.
    Always with modern 6.2

  7. #7
    Sencha Premium Member richardvd's Avatar
    Join Date
    Jun 2011
    Location
    NL
    Posts
    255

    Default

    I am able to use the Ext.Map component in SA 4.1.0.91 without warnings as described in this thread.

  8. #8
    Ext JS Premium Member
    Join Date
    Sep 2008
    Posts
    157

    Default

    From Google Console:
    "You have included the Google Maps API multiple times on this page. This may cause unexpected errors."

    Version: 4.1.0.91
    Channel: 4.1-stable
    Platform: 1.2.8.3 - darwin x64
    Renderer: 51.0.2704.106
    Cmd: 6.2.1.29
    Framework: Ext JS 6.2.x Modern

  9. #9
    Sencha Premium Member richardvd's Avatar
    Join Date
    Jun 2011
    Location
    NL
    Posts
    255

    Default

    The Ext.Map component already loads the Google Maps API by itself, but SA by default will also add that resource, hence the message.

    You can fix that by deleting the Google Maps API resource in SA.

  10. #10
    Ext JS Premium Member
    Join Date
    Sep 2008
    Posts
    157

    Default

    GoogleMapsApi removed from SA Project Inspector...

    Quote Originally Posted by richardvd View Post
    The Ext.Map component already loads the Google Maps API by itself, but SA by default will also add that resource, hence the message.

    You can fix that by deleting the Google Maps API resource in SA.

    BUT NOW

    "Google Maps API error: MissingKeyMapError"


    In Application->launch i have this code:
    Code:
    Ext.define('Override.mixin.Mashup', {    override: 'Ext.mixin.Mashup',
    
    
        onClassMixedIn: function (targetClass) {
            if (targetClass.$className === 'Ext.ux.google.Map') {
                targetClass.prototype.requiredScripts = [
                    '//maps.googleapis.com/maps/api/js?key=<my_key>'
                ];
            }
            this.callParent([targetClass]);
        }
    });

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 19 May 2014, 8:54 PM
  2. Google maps in Sencha gives error on Android
    By nickyhaze in forum Sencha Touch 2.x: Q&A
    Replies: 8
    Last Post: 22 Mar 2012, 2:27 AM
  3. google.maps.MapTypeId Error with GMapPanel3
    By europe72 in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 28 Sep 2011, 1:45 AM

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
  •