It seems from experimenting that no matter what, if you want to use a map you have to initiate the map in someway before runtime, either through setting maxx and maxy or actually creating a map. If you do this then you can adjust these variables during runtime to change the maps size.