add resize parameter for using layer with external maps
refactored message names
refactor message fields
added resize parameter for working with external maps
fix off-map error and add costmap locking
refactoring