Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/hadoop/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google maps extjs4.2中的地理定位谷歌地图API_Google Maps_Geolocation_Extjs4.2 - Fatal编程技术网

Google maps extjs4.2中的地理定位谷歌地图API

Google maps extjs4.2中的地理定位谷歌地图API,google-maps,geolocation,extjs4.2,Google Maps,Geolocation,Extjs4.2,我正试图把谷歌地图与我的网络系统,将跟踪终端,我与他们各自的地理位置。我已经有了谷歌的API密钥。所以,我使用这些代码 *编辑 这是我当前的代码,但我只能得到一个空白页 Ext.ns('dlti.view.widget'); //Order Window View Ext.define('dlti.view.widget.UserHome' ,{ extend: 'Ext.panel.Panel', id: 'dlti-user-home', alias: 'widget.UserHome',

我正试图把谷歌地图与我的网络系统,将跟踪终端,我与他们各自的地理位置。我已经有了谷歌的API密钥。所以,我使用这些代码

*编辑

这是我当前的代码,但我只能得到一个空白页

Ext.ns('dlti.view.widget');
//Order Window View
Ext.define('dlti.view.widget.UserHome' ,{
extend: 'Ext.panel.Panel',
id: 'dlti-user-home',
alias: 'widget.UserHome',
layout: {
    type: 'hbox',
    region: 'center'
},



        items:[
                {xype: 'gmappanel',
                title: 'Map',
                region: 'center',
        id:  'mygooglemap',
        zoomLevel: 3,
        gmapType: 'map',
        mapConfOpts:['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'],
    mapControls: ['GSmallMapControl','GMapTypeControl','NonExistantControl'],
        setCenter: {
            'lat': 37.4419,
            'lng': -122.1419
        }
                }


]


});
您需要添加

Ext.application({

    requires: [
        'Ext.ux.GMapPanel'
    ]
.....
});

这是什么xtype?您使用的是扩展还是在代码中定义的?如果是第三方模块,请提供代码或链接。我现在编辑了代码。我正在尝试显示一个带有地理位置的地图。您必须在web应用程序中加载google map api脚本。在html文件maps.google.com/maps/api/js?sensor=false>@srids中,它表示无法读取未定义的属性“Geocoder”。