Fixed gMaps

I made the gMaps code usable on a variety of map sizes.