mergechanged from damjan
merge change from mapjs
--automatic canvas resizing
automatic canvas resizing