Dog marking is a big and common issue. The common link in the (indoor) places that your dog ‘marks’ are places where many different dogs will frequent. Some of these will mark in these places also and, unless the business uses an enzyme based cleaner to clear up (assuming that they know it has happened in the first place) then the scent of urine will still be there and your dog will be able to smell this, even weeks later. Because of this your dog will interpret this as an area where it is okay to mark as others have done so before him. Your dog will not view these environments in the same light as homes etc as, in a home, there will be no pre-existing smell of urine.
The only way to stop the behaviour is to interrupt it and let him know that you don’t approve (by saying no), quickly move him a bit away from the spot and get him to sit then praise and reward the ‘sit’ response.
You will also reduce the risk if, prior to entering the premises, he has had plenty of chances outside to urinate/mark in order to empty his tank as such. If you interrupt your dog and immediately redirect him elsewhere then he will learn, if repeated enough, that you do not approve but will be rewarded away from the urine hot spots and only after he has stopped himself and complied with your request.
It is hard though as sometimes you need to have eyes at the back of your head, even when he is on lead. As stated, residual urine scent in places where lots of dogs go in/out will say to him this is an area where urinating is acceptable and commonplace – even when we know it is not. The key is to remain calm, interrupt the activity, show your disapproval (by saying no), move him away from the spot then give him praise/reward for sitting (or complying to some other instruction) when away from the area. Through time the penny will drop (no pun intended).
I would fret too much as your dog will not have been the first and certainly will not be the last. As long as it is just marking behaviour (where only (relatively) small spots of urine are released) and not a full flow pee then you will be able to control and manage this via the above technique. If it is a full flow pee then you need to get him outside as soon as possible.