Ganitai
28 Aug 2012, 6:43 AM
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!
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('');
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!
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('');