By default, the ID for each DITA map is the base name of the file from which the map was generated. This is true for both book files and chapter files.
To specify a different chapter map ID, include the following setting in a chapter-specific configuration file named for the DITA file (see §42.1.1 Providing configuration files for individual ditamaps):
[DITAOptions] ; MapID = id for chapter file ditamap, default is base file name MapID = otherid
Alternatively, you can insert a DITAMapID PI marker in the file. The content of the marker becomes the id attribute for the map generated from the file, overriding any value specified for MapID.
To specify a different book map ID, in your project configuration file:
[DITAOptions] ; BookMapID = id for book file ditamap, default is base book file name BookMapID = bookid
You cannot use a PI marker to override the id attribute of a map generated from a book file.