If you want to reuse a single map for all of the WP post pages, without creating a separate map for every post, use the following approach.
1. Disable the default loading of the objects on map load, by disabling the following option: Map editor / Database / Load on start
2. Filter the database by current post ID, which can be found in the <body> HTML tag. Add the following code to Map editor / JavaScript / afterInit event handler:
function(event) {
const { map } = event;
// We need to do this only on the front-end:
if(!map.inBackend){
// Get the body element
const body = document.body;
// Use regex to match either 'page-id-XXX' or 'postid-XXX' and extract the number (XXX)
const pageIdMatch = body.className.match(/(?:page-id|postid)-(\d+)/);
// If the class exists, store the number (XXX) in a constant
const postId = pageIdMatch ? pageIdMatch[1] : null;
if(postId){
map.database.find({filters: {post: postId}})
}
}
}