Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send google maps location info through SMS as a link

In an application that I'm building,

I am trying to send my location info(Lat,Long/ Geocoded) to my emergency contact list.

I am assuming that all my recipients are using smartphones(Android/iOS)

Until now, the application sends my location info as a string through SMS:

"I am at: " + Some Geocoded Location

However, I thought that this is not an optimal way of sending the exact location info.

So, I was thinking if it was possible to generate a map through Google Maps API with a

pinpoint/dot on it, and send a link to that map.

Can this be done in Device level(Without contacting any servers)

Or, can this be done by making my own map website?

Or, is this not possible at all?

I'd appreciate better approaches and suggestions as well.

Thank you in advance

like image 828
Se Won Jang Avatar asked Sep 26 '13 06:09

Se Won Jang


People also ask

How do I text a Google map link?

Embed a map or directionsClick Share or embed map. Click Embed map. Copy the text in the box. Paste it into the HTML of your website or blog.


1 Answers

The simple and smarter way is to use q= parameter, so that it displays the map with the point marked.


Example -:

http://maps.google.com/?q=<lat>,<lng>

where lat- latitude, lng- longitude


If the device that receives the sms with the above link is one of following :

  • Smartphone(say android) , then it will show maps application in launching intent list on device when clicked on the above shared url.
  • If not (simple phone) the link will redirect to browser with the maps.google.com showing the location with pin point.
like image 71
Arpit Garg Avatar answered Oct 05 '22 21:10

Arpit Garg