0

I would like to SMS a URL with a call to the Google Maps API to visualize users' location relative to a location I choose, e.g.:

chosen location: https://www.google.com/maps/place/Boston,+MA/@42.3142647,-71.110369,11z/data=!3m1!4b1!4m5!3m4!1s0x89e3652d0d3d311b:0x787cbf240162e8a0!8m2!3d42.3600825!4d-71.0588801

I am quite sure I did it once but I forgot how that works...

0

You probably meant the Google Static Maps API

https://maps.googleapis.com/maps/api/staticmap?center=47,19&size=600x600&markers=color:blue|label:A|48,20&markers=color:green|label:B|Budapest,Hungary&key=your-maps-api-key

You can use this link to display two (or more locations). You'll need to provide:

  1. The center of the map (either latlng or an address) in the center attribute
  2. Additonal locations like markers=color:blue|label:A|48,20 Location in this case is the same as in #1: latlng or address. See the end of the highlighted string.
  3. Your google maps api key

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.