map.invalidateSize is not a function

554 views
Skip to first unread message

Alex Fortney

unread,
Feb 14, 2014, 12:48:25 AM2/14/14
to leafl...@googlegroups.com
I am getting a strange error when I try to make it so the map will automatically resize for a responsive site. The CSS height of the map updates, but when I try resizing the map using:

$(window).resize(function(){
    map.invalidateSize(false);
});

It returns that map.invalidateSize is not a function, same with false or true

The site I am working on is here: http://www.alexfortneydesign.com/clients/campustown/location/

Patrick Lismore

unread,
Jan 25, 2016, 9:10:17 AM1/25/16
to Leaflet
Did you get a resolution to this, I am getting the same. 

Malcolm Meyer

unread,
Jan 26, 2016, 9:15:32 AM1/26/16
to Leaflet
That's a nice map. Are you pulling the data right from wordpress, and if so how are you doing that? In terms of resizing the map, just use an iframe inside a responsive div, then you can resize that however you want with css.
Reply all
Reply to author
Forward
0 new messages