1. #1
    Sencha User
    Join Date
    Sep 2013
    Posts
    67
    Vote Rating
    2
    maecy is on a distinguished road

      0  

    Default Unanswered: Geolocation Google Maps API in Extjs 4.2

    Unanswered: Geolocation Google Maps API in Extjs 4.2


    I am trying to put a google map with my web system that will track the terminals I have with their respective geolocation. I already have my API Key from google. So, I am using these codes but I am getting an error.

    Code:
                                     items:[
    					{
    					 xtype: 'map',
    						title: 'Map',
    						getLocation: true
    					},
                                            ]
    If anyone could help me that would be really great.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,868
    Answers
    652
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

  3. #3
    Sencha User
    Join Date
    Sep 2013
    Posts
    67
    Vote Rating
    2
    maecy is on a distinguished road

      0  

    Default


    I still gets this error: Uncaught TypeError: Cannot call method 'substring' of undefined

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,868
    Answers
    652
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    If the examples did not help, then you will need to post your code so we can have a look.

  5. #5
    Sencha User
    Join Date
    Sep 2013
    Posts
    67
    Vote Rating
    2
    maecy is on a distinguished road

      0  

    Default


    So, basically, I just want to display the map in my web. Here's my code:
    Code:
    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:[{
    					xtype: 'label',
    					html: '<b>Welcome Guest!</b>'
    		            },
    					{
    					 xtype: 'gmappanel',
    						title: 'Map',
    						getLocation: true
    					},
    			       
    	]
    
    
    	
    });

  6. #6
    Sencha User
    Join Date
    Sep 2013
    Posts
    67
    Vote Rating
    2
    maecy is on a distinguished road

      0  

    Default


    I still haven't resolved my problem. This is my current code but it returns only as a blank..

    Code:
    items:[
    					{xype: 'gmappanel',
    					title: 'Map',
    					getLocation: true,
    					 gmapType: 'map',
                        zoomLevel: 14,
                        setCenter: {
                            lat: 14.482089,
                            lng: 120.8919,
                            marker: {
                                title: 'Central Park'
                            }}
    					}

  7. #7
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,868
    Answers
    652
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    You should have another look at our example and review the config settings:
    http://docs.sencha.com/extjs/4.2.1/e...window/gmap.js

  8. #8
    Sencha User
    Join Date
    Sep 2013
    Posts
    67
    Vote Rating
    2
    maecy is on a distinguished road

      0  

    Default


    I always get this error: Uncaught TypeError: Cannot call method 'substring' of undefined
    Code:
    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: [{
                        xtype: 'gmappanel',
                        center: {
                            geoCodeAddr: '4 Yawkey Way, Boston, MA, 02215-3409, USA',
                            marker: {title: 'Fenway Park'}
                        },
                        markers: [{
                            lat: 42.339641,
                            lng: -71.094224,
                            title: 'Boston Museum of Fine Arts',
                            listeners: {
                                click: function(e){
                                    Ext.Msg.alert('It\'s fine', 'and it\'s art.');
                                }
                            }
                        },{
                            lat: 42.339419,
                            lng: -71.09077,
                            title: 'Northeastern University'
                        }]
                    }
    				]
    	
    });

  9. #9
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,645
    Answers
    431
    Vote Rating
    583
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  10. #10
    Sencha User
    Join Date
    Sep 2013
    Posts
    67
    Vote Rating
    2
    maecy is on a distinguished road

      0  

    Default


    I have looked at the examples but still no luck. Could anyone be kind enough to guide me into putting a map inside my system? I really need help.

Thread Participants: 2

Tags for this Thread