This function takes the following parameter:
The specified map object. It may be NULL.
Be sure not to pass map as a valid am_map structure as the reference will be lost.