execute align xz run tp @s ~0.5 ~ ~0.5
$execute at @s if entity @n[scores={map_id=$(map_id)},distance=..1] run return run tellraw @s ["",{"text":"There is already a marker here! (","color":"red"},{"selector":"@n[scores={map_id=$(map_id)},distance=..1]","color":"yellow"},{"text":")","color":"red"}]
$execute store result score .num temp if entity @e[type=marker,tag=shop_location,scores={map_id=$(map_id)}]
execute if score .num temp matches 2.. run return run tellraw @s {"text":"There are already 2 or more shops! Remove an old one to place a new one!","color":"red"}
$execute at @s run summon marker ~ ~ ~ {Tags:["shop_location","new"],CustomName:{"color":"gold","text":"shop_location$(map_id)"}}
$scoreboard players set @n[tag=new] map_id $(map_id)
tag @n[tag=new] remove new
$tellraw @s {"text":"Placed new shop_location for map $(map_id)","color":"gold"}