Obsolete
Status Update
Comments
as...@gmail.com <as...@gmail.com> #2
It would be good if a solution for this issue will be found soon. Lot of applications
have the feature that the mapframe can be resized.
have the feature that the mapframe can be resized.
ll...@gmail.com <ll...@gmail.com> #3
[Comment deleted]
pa...@gmail.com <pa...@gmail.com> #4
We will be removing that noResize option and we are actively working on a solution for
checkResize.
checkResize.
ll...@gmail.com <ll...@gmail.com> #5
----edited----
Now I re-initialize map every time when changing canvas size occures - as temporary
solution.
Now I re-initialize map every time when changing canvas size occures - as temporary
solution.
d....@gtempaccount.com <d....@gtempaccount.com>
ni...@gmail.com <ni...@gmail.com> #6
Hi
What is the status on this?
The issue displays as "Fixed" but no solution is provided and GMap.checkResize() has
not been ported to the API 3.
Any help appreciated.
What is the status on this?
The issue displays as "Fixed" but no solution is provided and GMap.checkResize() has
not been ported to the API 3.
Any help appreciated.
da...@gmail.com <da...@gmail.com> #7
From the code linked in the first post:
google.maps.event.trigger(map, 'resize');
I'm using this to fix map which has been initialised in hidden DIV (having size 0x0)
and it works
google.maps.event.trigger(map, 'resize');
I'm using this to fix map which has been initialised in hidden DIV (having size 0x0)
and it works
ni...@gmail.com <ni...@gmail.com> #8
It does not seem to work when you use % values instead of px values for the dimension
of the map div.
of the map div.
vs...@gmail.com <vs...@gmail.com> #9
I'm initializing a map in a hidden div that is created using jquery's boxy plugin.
My map container has a fix width and a fixed height however when using
google.maps.event.trigger(map, 'resize');
The map would load but would be grey. After some experimentation I found a fix by
zooming in the map one level and then back out one level:
resize:function(){
google.maps.event.trigger(this.map, 'resize');
this.map.setZoom( this.map.getZoom() - 1 );
this.map.setZoom( this.map.getZoom() + 1 );
}
My map container has a fix width and a fixed height however when using
google.maps.event.trigger(map, 'resize');
The map would load but would be grey. After some experimentation I found a fix by
zooming in the map one level and then back out one level:
resize:function(){
google.maps.event.trigger(this.map, 'resize');
this.map.setZoom( this.map.getZoom() - 1 );
this.map.setZoom( this.map.getZoom() + 1 );
}
fb...@gmail.com <fb...@gmail.com> #10
I have the same issue. What do you mean with:
resize:function(){
google.maps.event.trigger(this.map, 'resize');
this.map.setZoom( this.map.getZoom() - 1 );
this.map.setZoom( this.map.getZoom() + 1 );
}
that's not working for me. Do you mean to overload the resize event with that code or some thing like that?
resize:function(){
google.maps.event.trigger(this.map, 'resize');
this.map.setZoom( this.map.getZoom() - 1 );
this.map.setZoom( this.map.getZoom() + 1 );
}
that's not working for me. Do you mean to overload the resize event with that code or some thing like that?
ma...@gmail.com <ma...@gmail.com> #11
This issue still hasn't been fixed. Also, the above solution doesn't work for me. I
solved it by doing this:
google.maps.event.addListener(map, "idle", function(){
google.maps.event.trigger(map, 'resize');
});
this.map.setZoom( this.map.getZoom() - 1);
this.map.setZoom( this.map.getZoom() + 1);
I think the resize event is being triggered to soon, before the map has been
repainted after resizing.
solved it by doing this:
google.maps.event.addListener(map, "idle", function(){
google.maps.event.trigger(map, 'resize');
});
this.map.setZoom( this.map.getZoom() - 1);
this.map.setZoom( this.map.getZoom() + 1);
I think the resize event is being triggered to soon, before the map has been
repainted after resizing.
vs...@gmail.com <vs...@gmail.com> #12
My above solution was pulled from an internal function.
The simple solution is to run:
google.maps.event.trigger(map, 'resize');
map.setZoom( map.getZoom() );
The simple solution is to run:
google.maps.event.trigger(map, 'resize');
map.setZoom( map.getZoom() );
wo...@gmail.com <wo...@gmail.com> #13
thank you vsumner, works perfect!
in fact it also fixed issue #766 for me :)
in fact it also fixed issue #766 for me :)
cb...@google.com <cb...@google.com> #14
Do you guys have a test page for this corner case? I don't quite understand the problem.
Preferably without jQuery and/or jQuery plugins.
Preferably without jQuery and/or jQuery plugins.
wi...@gmail.com <wi...@gmail.com> #15
Hi, i there, is my first time using the google maps api, i am having problem with the render options. I have a div that contains the map, and another div that hide the half of the map and when you mouseover the div get a higher height to show the entire map, but its seem bad very bad the icons doesn look like png and stuff like, how i can resolve this?
If i put the map alone without any div the problem continue.
If i put the map alone without any div the problem continue.
wi...@gmail.com <wi...@gmail.com> #16
This is the code i am using:
google.load("maps", "3", {other_params:"sensor=false"});
var map;
function initialize() {
var mapDiv = document.getElementById('map');
map = new google.maps.Map(mapDiv, {
center: new google.maps.LatLng(18.464182,-69.908366),
zoom: 17,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
},
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
}
});
google.maps.event.addListenerOnce(map, 'tilesloaded', addMarkers);
}
function addMarkers() {
var image = 'http://www.dunkerdental.com/images/map-marker.png ';
var latLng = new google.maps.LatLng(18.463990,-69.908018);
var marker = new google.maps.Marker({
position: latLng,
map: map,
icon: image
});
}
google.load("maps", "3", {other_params:"sensor=false"});
var map;
function initialize() {
var mapDiv = document.getElementById('map');
map = new google.maps.Map(mapDiv, {
center: new google.maps.LatLng(18.464182,-69.908366),
zoom: 17,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
},
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
}
});
google.maps.event.addListenerOnce(map, 'tilesloaded', addMarkers);
}
function addMarkers() {
var image = '
var latLng = new google.maps.LatLng(18.463990,-69.908018);
var marker = new google.maps.Marker({
position: latLng,
map: map,
icon: image
});
}
ja...@gmail.com <ja...@gmail.com> #17
I get round this issue by delaying the resize trigger by 300ms (in ExtJS I use Ext.util.DelayedTask - you can do it in plain JavaScript with setTimeout() )
ad...@gmail.com <ad...@gmail.com> #18
Solution in comment #12 works great :)
wi...@gmail.com <wi...@gmail.com> #19
post #8 is correct, that method does not work when using % values for the size. however, re-initializing the map when the div is unhidden does the trick.
ex:
function(){
$('#mapDIV').show();
initialize();
});
ex:
function(){
$('#mapDIV').show();
initialize();
});
si...@gmail.com <si...@gmail.com> #20
[Comment deleted]
cb...@google.com <cb...@google.com> #21
No need to reinitialize the whole map. Just trigger the resize event:
google.maps.event.trigger(map, 'resize');
google.maps.event.trigger(map, 'resize');
sk...@gmail.com <sk...@gmail.com> #22
---> google.maps.event.trigger(map, 'resize');
This works great, but the CENTER of the map is moved off the left top bounderies of the container!
This works great, but the CENTER of the map is moved off the left top bounderies of the container!
sk...@gmail.com <sk...@gmail.com> #23
Finally I got the solution!
Goal: Populate 2 text boxes with LATITUDE & LONGITUDE while moving a marker.
Case: Loading the map inside a hidden division with a single draggable marker.
Problem 1: Map itself shifts off to top left in the container.
Problem 2: After fixing Probelm 1, the marker shifts off to top left in the map.
Solutions: On the OnClick event of the image that is used to show/hide the map;
---> google.maps.event.trigger({map}, 'resize'); {map}.setCenter({marker}.getPosition());
Goal: Populate 2 text boxes with LATITUDE & LONGITUDE while moving a marker.
Case: Loading the map inside a hidden division with a single draggable marker.
Problem 1: Map itself shifts off to top left in the container.
Problem 2: After fixing Probelm 1, the marker shifts off to top left in the map.
Solutions: On the OnClick event of the image that is used to show/hide the map;
---> google.maps.event.trigger({map}, 'resize'); {map}.setCenter({marker}.getPosition());
we...@gmail.com <we...@gmail.com> #24
[Comment deleted]
zs...@gmail.com <zs...@gmail.com> #25
#19 is right.
You should show the div before initialize it.
I stock 10 hours for this bug!
You should show the div before initialize it.
I stock 10 hours for this bug!
va...@gmail.com <va...@gmail.com> #26
Solution under comment #11 worked great for me. Thanks!
jg...@gmail.com <jg...@gmail.com> #27
google.maps.event.trigger(map, 'resize');
map.setZoom(map.getZoom());
map.fitBounds(bounds);
ki...@gmail.com <ki...@gmail.com> #28
Hello! I could do with a little help please?!
I am also having a problem with the google maps on hidden tabs not resizing when the tab is selected. I have tried just about every suggested solution but I'm not sure if I am inserting the fixes in the right place.
The code I'm using is below, I was wondering if someone could tell me where to try inseting the resize fixes?
(header)
<script type="text/javascript">
function initDexGoogleMap(canvas, width, w_unit, height, h_unit, latitude, longitude, p_zoom, p_mapType, p_navControl, p_navStyle, p_navPosition, p_mapTypeC, p_mapTypeCStyle, p_mapTypeCPosition, p_scaleC, p_scaleCPosition, p_draggable, p_disableDoubleClickZoom, p_keyboardShortcuts, p_trafficL, p_bikeL, p_panoramio )
{document.write('<div id="'+canvas+'"></div>');
document.getElementById(canvas).style.width = width + w_unit; document.getElementById(canvas).style.height = height + h_unit;
var latlng = new google.maps.LatLng(latitude,longitude);
var myOptions = {zoom: p_zoom, center: latlng, navigationControl: p_navControl, navigationControlOptions: {style: p_navStyle, position: p_navPosition}, mapTypeControl: p_mapTypeC, mapTypeControlOptions: {style: p_mapTypeCStyle, position: p_mapTypeCPosition}, scaleControl: p_scaleC, scaleControlOptions:
{position: p_scaleCPosition}, mapTypeId: p_mapType, draggable: p_draggable, disableDoubleClickZoom: p_disableDoubleClickZoom, keyboardShortcuts: p_keyboardShortcuts};
var map = new google.maps.Map(document.getElementById(canvas), myOptions);
(Body)
<div id="DEX_GContainer0">
<script type="text/javascript">var my_DEX_GContainer0 = initDexGoogleMap
("DEX_GContainer0","450","px","450","px",51.5313695, -0.1031838,16,google.maps.MapTypeId.ROADMAP,true,google.maps.
NavigationControlStyle.DEFAULT,google.maps.ControlPosition.TOP_LEFT,true,google.maps.MapTypeControlStyle.DEFAULT,google.maps.ControlPosition.TOP_RIGHT,true,google.maps.ControlPosition.BOTTOM_LEFT,true,false,true,false,false,false); addMarker(my_DEX_GContainer0,51.5313695,-0.1031838,false,"Fitness%20First","","","click","");
</script>
</div>
I am also having a problem with the google maps on hidden tabs not resizing when the tab is selected. I have tried just about every suggested solution but I'm not sure if I am inserting the fixes in the right place.
The code I'm using is below, I was wondering if someone could tell me where to try inseting the resize fixes?
(header)
<script type="text/javascript">
function initDexGoogleMap(canvas, width, w_unit, height, h_unit, latitude, longitude, p_zoom, p_mapType, p_navControl, p_navStyle, p_navPosition, p_mapTypeC, p_mapTypeCStyle, p_mapTypeCPosition, p_scaleC, p_scaleCPosition, p_draggable, p_disableDoubleClickZoom, p_keyboardShortcuts, p_trafficL, p_bikeL, p_panoramio )
{document.write('<div id="'+canvas+'"></div>');
document.getElementById(canvas).style.width = width + w_unit; document.getElementById(canvas).style.height = height + h_unit;
var latlng = new google.maps.LatLng(latitude,longitude);
var myOptions = {zoom: p_zoom, center: latlng, navigationControl: p_navControl, navigationControlOptions: {style: p_navStyle, position: p_navPosition}, mapTypeControl: p_mapTypeC, mapTypeControlOptions: {style: p_mapTypeCStyle, position: p_mapTypeCPosition}, scaleControl: p_scaleC, scaleControlOptions:
{position: p_scaleCPosition}, mapTypeId: p_mapType, draggable: p_draggable, disableDoubleClickZoom: p_disableDoubleClickZoom, keyboardShortcuts: p_keyboardShortcuts};
var map = new google.maps.Map(document.getElementById(canvas), myOptions);
(Body)
<div id="DEX_GContainer0">
<script type="text/javascript">var my_DEX_GContainer0 = initDexGoogleMap
("DEX_GContainer0","450","px","450","px",51.5313695, -0.1031838,16,google.maps.MapTypeId.ROADMAP,true,google.maps.
NavigationControlStyle.DEFAULT,google.maps.ControlPosition.TOP_LEFT,true,google.maps.MapTypeControlStyle.DEFAULT,google.maps.ControlPosition.TOP_RIGHT,true,google.maps.ControlPosition.BOTTOM_LEFT,true,false,true,false,false,false); addMarker(my_DEX_GContainer0,51.5313695,-0.1031838,false,"Fitness%20First","","","click","");
</script>
</div>
[Deleted User] <[Deleted User]> #29
Hi, tkns for all, this solution works for me
sorry about my english, iam from mexico.
sorry about my english, iam from mexico.
kl...@gmail.com <kl...@gmail.com> #30
I have a similar issue. I'm initializing 2 maps, one in a showing DIV and one in a hidden. The idea is to allow user to click a tab to switch between map views. Thanks to everybody here. I have tried just about every suggestion. The page is somewhat working. However, I still cant get it to work perfectly. The following code is the best result so far. Even with this, only partial map will show on the first click. I have to click the button a second time to get the map to show correctly. Suspect there might be another .click function on the same DIV in another js file. It is so tricky to find a workaround. Any suggestion here?
function init() {
$(.gmap).gmap3( { action: 'init', .... });
map1 = $(mapID1).gmap3('get');
map2 = $(mapID2).gmap3('get');
$("#switchmap").click(function () { resizeMap(map1) });
$("#switchmap2").click(function () { resizeMap(map2) });
}
function resizeMap(m) {
x = m.getZoom();
c = m.getCenter();
google.maps.event.trigger(m, 'resize');
m.setZoom(x);
m.setCenter(c);
};
function init() {
$(.gmap).gmap3( { action: 'init', .... });
map1 = $(mapID1).gmap3('get');
map2 = $(mapID2).gmap3('get');
$("#switchmap").click(function () { resizeMap(map1) });
$("#switchmap2").click(function () { resizeMap(map2) });
}
function resizeMap(m) {
x = m.getZoom();
c = m.getCenter();
google.maps.event.trigger(m, 'resize');
m.setZoom(x);
m.setCenter(c);
};
ju...@monkeyhut.com.au <ju...@monkeyhut.com.au> #31
hey guys,
I'm using the Google Maps api v3 to create a map which can be resized (the div is expanded and contracted using a jQuery toggle). According to comment #21 (and the google documentation), I should call google.maps.event.trigger(map, 'resize'); when resizing the map. I have done so, but I still have problems with the tiles refreshing.
You will see what I mean if you visit the page in question and expand the map then try to pan around:
http://monkeyhut.com.au/contact/
The code I am using is:
<script>
document.write('<a id="expandMap" href="#" target="_blank" title="Expand the map">+ expand map</a>');
/* Expand map_canvas DIV */
jQuery('#expandMap').toggle(function(){
jQuery('a#expandMap').text('- contract map');
jQuery('a#expandMap').attr('title', 'Contract the map');
jQuery('#map_canvas').animate({'height': '600px'}, 750, 'swing');
google.maps.event.trigger(map, 'resize'); }, function(){
jQuery('a#expandMap').text('+ expand map'); jQuery('a#expandMap').attr('title', 'Expand the map'); jQuery('#map_canvas').animate({'height': '193px'}, 750, 'swing'); google.maps.event.trigger(map, 'resize');
});
/* Expand map_canvas DIV End */
</script>
Can anyone suggest any ideas? When expanded, if you click the contract button there is a flash where all the tiles are properly visible, so it looks like the resize event is triggered when contracting. In contracted state, the map works perfectly; panning around all the tiles refresh as they should.
Really appreciate any help with this!
Cheers!
I'm using the Google Maps api v3 to create a map which can be resized (the div is expanded and contracted using a jQuery toggle). According to
You will see what I mean if you visit the page in question and expand the map then try to pan around:
The code I am using is:
<script>
document.write('<a id="expandMap" href="#" target="_blank" title="Expand the map">+ expand map</a>');
/* Expand map_canvas DIV */
jQuery('#expandMap').toggle(function(){
jQuery('a#expandMap').text('- contract map');
jQuery('a#expandMap').attr('title', 'Contract the map');
jQuery('#map_canvas').animate({'height': '600px'}, 750, 'swing');
google.maps.event.trigger(map, 'resize'); }, function(){
jQuery('a#expandMap').text('+ expand map'); jQuery('a#expandMap').attr('title', 'Expand the map'); jQuery('#map_canvas').animate({'height': '193px'}, 750, 'swing'); google.maps.event.trigger(map, 'resize');
});
/* Expand map_canvas DIV End */
</script>
Can anyone suggest any ideas? When expanded, if you click the contract button there is a flash where all the tiles are properly visible, so it looks like the resize event is triggered when contracting. In contracted state, the map works perfectly; panning around all the tiles refresh as they should.
Really appreciate any help with this!
Cheers!
gt...@gmail.com <gt...@gmail.com> #32
[Comment deleted]
we...@gmail.com <we...@gmail.com> #33
Hi
I have the same map not showing correctly issue (the map is in one of the hidden div). It works fine for me on the v2 with specifying the map size in google map script but there is no such function in v3 and it will not show correctly. I tried google.maps.event.trigger({map}, 'resize') but doesn't work. not sure if I am doing it right. Below is the code for my js hidden div. can someone please help me with the issue?
function hidestories() {
var divs=document.getElementById('stories').getElementsByTagName('div');
for (j=0; j<divs.length; j++) {
var rE = new RegExp("(^|\\s)" + 'story' + "(\\s|$)");
if (rE.test(divs[j].className)) {
divs[j].style.display="none";
}
}
}
function stories(first) {
var thebuttons=document.getElementById('thebuttons').getElementsByTagName('a');
for (i=0; i<thebuttons.length; i++) {
thebuttons[i].onclick=function() {
hidestories();
var thestory=(this.href).split("#",2)[1];
document.getElementById(thestory).style.display="block";
return false;
}
}
if (first) {
var firstone=document.getElementById('stories').firstChild;
if (firstone.nodeType != 1) {firstone = firstone.nextSibling;}
firstone.style.display="block";
}
}
window.onload=function() {
hidestories();
stories(1);
}
I have the same map not showing correctly issue (the map is in one of the hidden div). It works fine for me on the v2 with specifying the map size in google map script but there is no such function in v3 and it will not show correctly. I tried google.maps.event.trigger({map}, 'resize') but doesn't work. not sure if I am doing it right. Below is the code for my js hidden div. can someone please help me with the issue?
function hidestories() {
var divs=document.getElementById('stories').getElementsByTagName('div');
for (j=0; j<divs.length; j++) {
var rE = new RegExp("(^|\\s)" + 'story' + "(\\s|$)");
if (rE.test(divs[j].className)) {
divs[j].style.display="none";
}
}
}
function stories(first) {
var thebuttons=document.getElementById('thebuttons').getElementsByTagName('a');
for (i=0; i<thebuttons.length; i++) {
thebuttons[i].onclick=function() {
hidestories();
var thestory=(this.href).split("#",2)[1];
document.getElementById(thestory).style.display="block";
return false;
}
}
if (first) {
var firstone=document.getElementById('stories').firstChild;
if (firstone.nodeType != 1) {firstone = firstone.nextSibling;}
firstone.style.display="block";
}
}
window.onload=function() {
hidestories();
stories(1);
}
da...@gmail.com <da...@gmail.com> #34
I followed comment #11 and it work. In my case have alot of markers with images.
mm...@gmail.com <mm...@gmail.com> #35
thanks a lot for this, nothing would position the map correctly (although resize does display the tiles)
solution in Comment 23 works great for me
solution in Comment 23 works great for me
ch...@gmail.com <ch...@gmail.com> #36
The Google Maps V3 rendering issue is not a conflict between jQuery and Google Maps API per se and the google.maps.event.trigger(map, 'resize') doesn't solve the problem as long as the map remains hidden within a container. To fix the bug, the map initialization must happen after the container is being shown, i.e when jQuery is sliding down or fading in something.
So doing something like the following would do the trick as opposed to call the initialize function after the page loads.:
$("button").click(function(){
$("#map_canvas").slideToggle("slow");
initialize()
}
Actually, the map would have rendered fine if the user were to re-size his browser window while looking at the partial map. Google solution google.maps.event.trigger(map, 'resize') works but only if you do something like setTimeout(function(){map.setZoom( map.getZoom() )}, 5000), but if the user after 5 seconds still didn't click on the button to SHOW the map, this will not work.
So doing something like the following would do the trick as opposed to call the initialize function after the page loads.:
$("button").click(function(){
$("#map_canvas").slideToggle("slow");
initialize()
}
Actually, the map would have rendered fine if the user were to re-size his browser window while looking at the partial map. Google solution google.maps.event.trigger(map, 'resize') works but only if you do something like setTimeout(function(){map.setZoom( map.getZoom() )}, 5000), but if the user after 5 seconds still didn't click on the button to SHOW the map, this will not work.
an...@gmail.com <an...@gmail.com> #37
#19 was correct the div must show before page map loads..
This helped me alot thanks guys -- Although i had issues with where to put the majority of the fixes here, eventually i used this:
$('#test1').delay(3000).gmap3(
I load the map in a bootstrap modal popup the delay works really well, for page load too.. i attached it to the script with a click function...
This helped me alot thanks guys -- Although i had issues with where to put the majority of the fixes here, eventually i used this:
$('#test1').delay(3000).gmap3(
I load the map in a bootstrap modal popup the delay works really well, for page load too.. i attached it to the script with a click function...
lg...@gmail.com <lg...@gmail.com> #38
Follow Post #19 if possible. That's a simple and stable way to solve this issue with a map in a hidden div ... just unhide the div first, then run the map code. This works if you are just performing a display:none to display:block or if you are using something like a .NET ModalPopupExtender with a $find('MapPop').show(); on a link to trigger the .NET Panel, then a call to initialize the map after the div is present.
ka...@thebluebridge.net <ka...@thebluebridge.net> #39
hey all..
i spent 4hrs on this page trying all the fixes mentioned....but couldnt get any to work.
Then i came across this page and it helped me to solve my problem:
http://blog.codebusters.pl/en/entry/google-maps-in-hidden-div
I implemented the 2nd solution on the above page....you can also look at the code here:
http://blog.codebusters.pl/demo/hidden_map_solution2.html
Good luck!
i spent 4hrs on this page trying all the fixes mentioned....but couldnt get any to work.
Then i came across this page and it helped me to solve my problem:
I implemented the 2nd solution on the above page....you can also look at the code here:
Good luck!
qt...@gmail.com <qt...@gmail.com> #40
[Comment deleted]
ts...@gmail.com <ts...@gmail.com> #41
Mareck!
thanks a lot for your solution in post #11!
you've saved me a lot of time :)
thanks a lot for your solution in post #11!
you've saved me a lot of time :)
fu...@gmail.com <fu...@gmail.com> #42
Comment has been deleted.
ji...@enjine.com <ji...@enjine.com> #43
#17 worked for me. Clocked in 10 hours or so.
no...@gmail.com <no...@gmail.com> #45
Hi,
Have the same problem as #30.
Is there yet a solution for this problem?
Have the same problem as #30.
Is there yet a solution for this problem?
go...@gmail.com <go...@gmail.com> #46
After wasting few hours the belode works fine. Call this after the map loaded or marker created..
setTimeout(function () {
google.maps.event.trigger(map, 'resize');
}, 100);
setTimeout(function () {
google.maps.event.trigger(map, 'resize');
}, 100);
[Deleted User] <[Deleted User]> #47
Comment has been deleted.
as...@gmail.com <as...@gmail.com> #48
wow thnx guys, its solves my problem. awesome
la...@gmail.com <la...@gmail.com> #49
Comment has been deleted.
ab...@gmail.com <ab...@gmail.com> #50
Try
google.maps.event.trigger($("#googleMap")[0], 'resize'); //Refresh Map
With jQuery and it will work for every place
google.maps.event.trigger($("#googleMap")[0], 'resize'); //Refresh Map
With jQuery and it will work for every place
ze...@gmail.com <ze...@gmail.com> #51
[Comment deleted]
fr...@gmail.com <fr...@gmail.com> #52
google.maps.event.trigger($("#googleMap")[0], 'resize'); // not working
version: gmaps api-v3
version: gmaps api-v3
ma...@gmail.com <ma...@gmail.com> #53
Chrome Version 42.0.2311.135 m
--> canvas was set to width: 100%
--> resize was set
not all map tiles displayed when browser is NOT maximized
working fine when browser is maximized
works fine in all cases when canvas size is set to fix px
--> canvas was set to width: 100%
--> resize was set
not all map tiles displayed when browser is NOT maximized
working fine when browser is maximized
works fine in all cases when canvas size is set to fix px
ko...@gmail.com <ko...@gmail.com> #54
Hi i have an issue loading jquery gmap3 google map inside the bootstrap modal popup.The map display partially.can any one give a solution for this?
am...@gmail.com <am...@gmail.com> #55
I had same issue using the gmap3 inside a bootstrap tab componenet http://getbootstrap.com/javascript/#tabs , and the solution i've found was calling the resize event after the tab is shown :
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
google.maps.event.trigger(map, 'resize');
map.setZoom( map.getZoom() );
})
Hope this can help.
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
google.maps.event.trigger(map, 'resize');
map.setZoom( map.getZoom() );
})
Hope this can help.
mu...@gmail.com <mu...@gmail.com> #56
I had the same problem with Streetview. The 'shown.bs.tab' hack solved my problem, when I changed the 'map' variable to 'panorama' (using the standard Google naming from the examples).
Thank you - after almost 3 hours of trial and error and searching through the net :)
Thank you - after almost 3 hours of trial and error and searching through the net :)
la...@gmail.com <la...@gmail.com> #57
#19 is the bomb! Thanks!!!
I spent several hours of debugging
I spent several hours of debugging
da...@gmail.com <da...@gmail.com> #58
#46 works for me, thanks!!
ho...@gmail.com <ho...@gmail.com> #59
I needed to refresh an OverlayMapType of tiles every time an array was changed, and Mareck's solution in comment #11 worked for me, so thank you very much, Mareck and all. It amazes me that code that old still works, actually, for a tool with such a volatile and frequent update schedule.
Description
When you change the size of the map, the tiles are not re-configured
properly. In v2, this was solved by calling checkResize(). v3 either needs
this function or needs to check for resizing internally.
Demo here- click test: