Welcome to the forum! There are a few things you may have run into. To start, the code sample you’ve pasted is from Mappedin SDK v5. Version 5 does not support maps created using the Mappedin Editor at Mappedin. It can only display maps that are created using our enterprise mapping tools.
The solution is to ensure you are using Mappedin SDK version 6. The best way to begin is to follow our Version 6 Getting Started Guide. Note that your map also has to have shareable turned on before you can use it in the SDK. The Getting Started guide walks through that process as well.