How to do map building simulation using SITL

I have created the gazebo environment, then i spwan the sitl iris model attached with rplidar inside this environment. The rplidar sending scan data on laser/scan topic which is visualizing in rviz successfully but when I ran the slam_gmapping node in the other end to build the map but I’m not getting the map.
Is there any other way should be followed to build the map of gazebo environment using sitl.
I have a planned to implement the same map building process with real quadrotor also, can anybody tried the same this kindly help me.