This function takes the following parameter:
Pointer specifying the location of the new map object.
Be sure not to pass map_ptr as a valid am_map structure as the reference will be lost.