Google map is working fine, but,

I am having trouble locating google map in Sencha touch app. Below is the code.

new Ext.application({ name:'Touch Start', launch:function(){ var map = new Ext.Panel({ fulscreen:true, items:[ { xtype:'map', useCurrentLocation:true, } ] }); this.viewport = map; } }); 

It’s good that it works fine and gives a warning that "Application Support / iPhone SImulator / 5.1 / Applictios / 887ED997-705D-4F52-AF9C-C740C0979302 / maps / app / www / index.html" Would like to use your current location ..

But when I click OK, nothing happens, but the screen is blank .. Please help if anyone has an idea about this. thanx in advance

+4
source share
2 answers

In addition to @ A1rPun's answer:

You have an error in the configuration of your application:

 name:'Touch Start', 

wrong!

Use

 name:'TouchStart', 

instead of this. Spaces are not allowed. Please note that this depends on your namespace! With the one above your application, you cannot load / enable any View, Model, Controller or Store.

+1
source

You are using Ext.aplication , which requires a specific folder structure.

For your example to work, just write:

 var map = new Ext.Panel({ fullscreen:true, items:[{ xtype:'map', useCurrentLocation:true }] }); 

PS: full screen mode with 2 L

+1
source

Source: https://habr.com/ru/post/1447180/


All Articles