added layerToMapCoordinates for rectangles, and more detailed comments
Merge pull request #568 from 3nids/layer2map

added layerToMapCoordinates for rectangles, and more detailed comments