Pinging a cellphone as I am sure you know, is simply sending a signal to that phone based on its nearby tower usage and knowing exactly where that phone is even if it is off. Any time your phone "sees" a tower, it pings it.
Only law enforcement officials are "legally" allowed to ping anothers cell phone and only with a court order to do so. Unless he gave you this phone and it is in his name, he has no legal authority to ping your cellphone. This is an invasion of privacy. The problem though is that it is hard to prove that someone has pinged your cell. There are also no recent criminal cases regarding this invasion of privacy issue.
So in answer to your question, no, this is not legal; however, charging him with it criminally will be very difficult due to a lack of prosecution for this crime.
If this has helped, please don't forget to accept so that I may be compensated for my time.
DISCLAIMER: Answers from Experts on JustAnswer are not substitutes for the advice of an attorney. JustAnswer is a public forum and questions and responses are not private or confidential or protected by the attorney-client privilege. The Expert above is not your attorney, and the response above is not legal advice. You should not read this response to propose specific action or address specific circumstances, but only to give you a sense of general principles of law that might affect the situation you describe. Application of these general principles to particular circumstances must be done by a lawyer who has spoken with you in confidence, learned all relevant information, and explored various options. Before acting on these general principles, you should hire a lawyer licensed to practice law in the jurisdiction to which your question pertains.
The responses above are from individual Experts, not JustAnswer. The site and services are provided “as is”. To view the verified credential of an Expert, click on the “Verified” symbol in the Expert’s profile. This site is not for emergency questions which should be directed immediately by telephone or in-person to qualified professionals. Please carefully read the Terms of Service (last updated February 8, 2012).