Is there a way to get physical location of computer through MAC address?, I know switch's address and computer's mac address.
All this on a LAN network
No, there is not.
MAC address are issued in blocks to network device builders and thats (usually) what you can infer from MAC addresses (who build the device), and thats all.
IP's on the other hand, can point to the general area where a computer may be connected to the internet.
Blocks of IPs are sold to Internet Service Providers and you can infer from the ISP where the device is connected to the internet.
There is something called a GeoIP database, that can correlate IP blocks (networks) to geografical locations. You might want to check with one.
As in locate a random internet device given it's MAC? Not a chance.
A MAC is a layer-2 address. Nothing beyond the local LAN (layer-2) segment knows, or cares, what that address is. For example, you have no idea what the MAC is of my computer. And even if I told you, there's no way to locate it on the internet.
Locating a single device within an enterprise network? The MAC can be found in switch tables localizing where it may be. Plugged into a specific port gives you a place to start physically looking, but patches can snake a connection all over the place.
If you have the ip address and it's on a LAN, look at the ARP Table of the gateway router to find the MAC.
Then with the mac address, find the source port of the mac, follow along and you will reach the switch it connects to.
Find the port on the switch.
Follow the cable.
You can do that by finding port of switch from which it's learning that mac address.
sh mac address-table d | in MAC-ADDRESS (in xxx.xxx.xxx format)
On JunOS switch:
show ether-switcthing-table mac XX:XX:XX:XX:XX:XX
and this will give you physical port. You can trace cable from it to the system then.
I hope this will help.