We are aware that this difference can be confusing for developers, but it’s unfortunately due to some historic choices on how to deal with incoming geometry/object whether it be surface-like (generated from the 2d drawing) or point-like (icons or texts anchored to a position).
When creating a new room/shop/office in VisioMapEditor, you can assign the surface an ID. It will lead to a Place in the data prepared for VisioWeb that you can get with getPlace(ID).
Furthermore, VisioMapEditor allows to associate a “label slot” to that surface. This will lead to a POI in addition to the Place. You can get that POI with getPoi(ID) and set it some text or some image.
Finally, the icons and “standalone” texts (“Exit”, “Work in progress”, etc) defined in the editor will lead to POIs in the data.
So, given an ID, there are 3 cases of representation in the map data :
2/ Place + POI
When you call setPlaceName on a given Place, under the hood, mapviewer will set that text on a POI that shares the same ID as the Place. This POI is created at startup because a “label bounding box” was added on that particular surface by the VisioMapEditor user, although it can be left empty.
You can use getPoi(ID) to retrieve the text POI that has been affected by setPlaceName. Attention, getPoi() will return an array of POIs because there can be several texts or images attached to a given ID. Usually there are only as many POIs as the number of LODs (Level Of Detail) in the map because the VisioMapEditor user specified one label bounding box on each LOD. If there is only one LOD (which is the case of MIA I believe), you will get an array with one result only.
Once you got the POI object, the method options will allow you to read what text was set on it.
var poi = mapviewer.getPoi(ID);
var text = poi.options('text');