Hi,
For viewing the code of existing service map iView, you can decompile the provided classes in your EP.
The servicemap code (and worksetmap) can be be found here in your EP file system:
..j2ee\cluster\apps\sap.com\com.sap.portal.navigation.worksetmap\servlet_jsp\com.sap.portal.navigation.worksetmap
Best Regards,
Tal