Google Maps API需要 [英] Google maps API required

查看:177
本文介绍了Google Maps API需要的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在我的应用程序中显示地图时,会在视图中显示Google Maps API required的消息,这里我的代码

When i try to show the map in my aplication its showing the messsage as "Google maps API required" in the view, Here my code

   var mapapnel = Ext.create('Ext.Panel', {
                      id: 'mapapnel',
                      height: '100%',
                      width: '100%',
                      fullscreen: true,
                      layout:'fit',
                      layout:'vbox',
                      items: [{
                      xtype: 'toolbar',
                      ui:'light',
                      docked: 'top',
                      title: 'Find location',
                      items: [{
                               text: 'Back',
                               ui: 'back',
                               handler: function() {
                                         Ext.getCmp('homepnl').setActiveItem(1);
                                                   }
                                },{
                                   xtype:'spacer'
                                  }]},
                                 {
                                  xtype:'map',
                                  useCurrentLocation:true
                                 }]});

显示地图需要什么更改?请帮我解决

What change required to show the map?please help me to solve

推荐答案

您需要加载google地图javascript api。

You need to load the google maps javascript api.

您可以通过添加代码在您的index.html文件中。

you can do this by adding the code in your index.html file.

<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=true"></script> 

这篇关于Google Maps API需要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆