ispypie
23 Jan 2012, 3:46 AM
Hi
I am trying to display a google map as part of my ui. Basically it is just taking an absolute age (minutes) to render the map. I get a grey box with some google text where the map should be and then go and make myself a coffee and maybe if I am lucky I may have a part of a map when I return. Eventually it does (most of the time) render the map.
I searched around and found the gmap panel for v3 of the maps api. I had same issue so then created my own panel with the following in afterRender taken from GmapPanel and google maps sample.
afterRender: function () {
this.callParent(arguments);
var myOptions = {
center: new google.maps.LatLng(-34.397, 150.644),
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(this.body.dom, myOptions);
google.maps.event.addListener(map, 'load', function () {
console.log('loaded map');
});
},
Its still the same. Has anyone had similar issue or any idea what may be the issue?
Thanks
Mark
I am trying to display a google map as part of my ui. Basically it is just taking an absolute age (minutes) to render the map. I get a grey box with some google text where the map should be and then go and make myself a coffee and maybe if I am lucky I may have a part of a map when I return. Eventually it does (most of the time) render the map.
I searched around and found the gmap panel for v3 of the maps api. I had same issue so then created my own panel with the following in afterRender taken from GmapPanel and google maps sample.
afterRender: function () {
this.callParent(arguments);
var myOptions = {
center: new google.maps.LatLng(-34.397, 150.644),
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(this.body.dom, myOptions);
google.maps.event.addListener(map, 'load', function () {
console.log('loaded map');
});
},
Its still the same. Has anyone had similar issue or any idea what may be the issue?
Thanks
Mark