Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
263 views
in Technique[技术] by (71.8m points)

android - 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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...