Hello rkrog,
We want to make sure we understand.
You received a spam message in Messages app. Did you respond to the message or simply block and delete it? The reason we ask this is that unless you explicitly share your location with the individual messaging you, there would be no way to them to receive that information. This is outlined in the articles below:
Turn Location Services and GPS on or off on your iPhone, iPad, or iPod touch - Apple Support
How to share your specific location
With iOS 14 and iPadOS 14, some apps can use Precise Location to get to your specific location. To share only your approximate location — which may be sufficient for an app that doesn’t need your exact location — turn Precise Location off. Here's how:
1. Go to Settings > Privacy, then select Location Services.
2. Select an app, then turn Precise Location on or off.
Learn more about privacy and Location Services.
In the details above, you are only sharing your location with the Messages app, not the individual texting you.
To share your location with one of your contacts, you'd need to follow the actions provided in article, Find friends and share your location with Find My - Apple Support
Share your location in the Messages app
1. Open the Messages app on your iPhone and select a message.
2. Select the name of the person at the top of the conversation.
3. Choose the information icon
.
4. Select Send My Current Location. Your recipient will see your location on the map. Or choose Share My Location. Then choose the length of time that you want to share your location for.
If you feel that your location was shared, not using the actions above, you'll want to reach out to Apple Support at Get Support, so they can investigate. They take your privacy very seriously and provide the highest security possible.
About privacy and Location Services in iOS and iPadOS - Apple Support
Best regards.