Open GoogleCodeExporter opened 8 years ago
you need to add:
google.maps.event.trigger( map, "resize" );
Original comment by TRaffe...@geo.to
on 2 Aug 2012 at 9:25
Thanks TRaffe,
Sadly no luck with that.
How would I implement it sorry a bit of a noob.
The jquery code I have running the map on m.golfsurrey.ca
$('#home').live('pagecreate', function() {
$('#map_canvas').gmap().bind('init', function() {
$.getJSON( 'Static/Files/maps.json', function(data) {
$.each( data.markers, function(i, marker) {
$('#map_canvas').gmap('addMarker', {
'position': new google.maps.LatLng(marker.latitude, marker.longitude),
'bounds': true
}).click(function() {
var content = '<p><a href="' + marker.filename + '" title="' + marker.title + '">' + marker.title + '</a></p>';
content += '<hr/>';
content += '<p>' + marker.address + '<br/>' + marker.phone + '</p>';
$('#map_canvas').gmap('openInfoWindow', { 'content': content }, this);
});
});
});
});
});
If you pull up on desktop I have the accordion expanded so try on mobile so it
starts in an uncollapsed state opening the map accordion loads the map but
doesn't reposition or show the markers.
Greatly appreciate the assistance.
Original comment by ghy...@allscenes.com
on 3 Aug 2012 at 11:27
Seems like an important issue to me. Map was displaying fine, until I added
jQuery accordion. Now it appears as a small box on left center. Have resize,
fit bounds, etc. in the code.
Original comment by diwa...@gmail.com
on 16 Jan 2015 at 7:20
Original issue reported on code.google.com by
ghy...@allscenes.com
on 7 Jun 2012 at 9:12Attachments: