1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    9
    Vote Rating
    0
    Ganitai is on a distinguished road

      0  

    Default Unanswered: How to set Markers in a Map after maprender-event?

    Unanswered: How to set Markers in a Map after maprender-event?


    Hi everyone,


    I am building an application to show some markers in a coordinate system. I wanna use Google Maps to use its zoom-events and some more features. I created a few costum.map.types and its workin fine. But when I start to insert a marker in my map nothing happens. I am using the maprender-event, but nothing happens, its also the same with the painted-event. There must be a mistake in the Code but I cant see.
    I would be very happy if someone could help me.


    Thanks in advance!


    Code:
    Ext.define('App.view.FlavorMap', {
    
    
        extend: 'Ext.Container',
        requires: ['Ext.Map'],    
        //id: 'x1',
        xtype: 'flavormap',
    
    
        config: {
            title: 'Whisky Map',
            iconCls: 'maps',
            layout: 'fit',
    
            items: [
                {
                    docked: 'top',
                    xtype: 'toolbar',
                    title: 'Whisky Map',
                    defaults: {
                        iconMask: true
                    }
                },
                {
                    xtype: 'map',
                    useCurrentLocation: false,
                    mapOptions: {
                        mapTypeIds: ['brown','blue'],
                        zoom: 1,
                        streetViewControl: false,
                        mapTypeControlOptions: {
                            mapTypeIds: ['brown','blue'],
                            style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
                        },
                        mapTypeId: 'brown',
                        center: new google.maps.LatLng(0,0)
                    }
                }
            ],
            listener: [
                {
                    maprender: function() {
                        alert("Map rendered!"); //neither maprender nor painted works
                    }
                }
            ]
        },
    });
    
    
    Ext.Viewport.setStyleHtmlContent(true);
    Ext.Viewport.setHtml('');

  2. #2
    Sencha User
    Join Date
    Aug 2012
    Posts
    9
    Vote Rating
    0
    Ganitai is on a distinguished road

      0  

    Default


    Hi guys,

    would be very nice if someone could take a look at my codes. Somethink is missing, but I dont really know what. The console tells me: map: undefiend.
    I now use the listener show, because maprender do nothing (the custom maptypes?). but I still dont know how to add markers. This is my Code for the Marker from the controller.

    Code:
    flavorMapView: {	show: function(){
    					
    		console.log('Map component is shown');
    		var marker = new google.maps.Marker({
    		position: new google.maps.LatLng(0,0),
    		map: google.maps.x1
    		});
    		console.log(marker);
    	}
    },

  3. #3
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    867
    Answers
    9
    Vote Rating
    1
    micgala is on a distinguished road

      0  

    Default


    Hi. You might wanna try posting this in ext js forum instead (this one is for gxt)

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar