[Solved] Passing coordinates values from google sheets columns in static map URL


I think you had Lat, long wrong way around. Some mapping systems require Lat, Lng and others Lng, Lat (go figure!)

If you change as below, you will get an image, but you may need to play with other parameters to get it working as you need.

=IMAGE("https://api.mapbox.com/styles/v1/mapbox/streets-v10/static/"&K3&","&J3&",14.25,0,60/600x600?access_token=API_KEY")

You can also use the form below which is another way to construct the API string from the component parts.

=image(concatenate("https://api.mapbox.com/styles/v1/mapbox/streets-v10/static/",K3,",",J3,",14.25,0,60/600x600?access_token=ACCESS_KEY"))

In both cases, the parameters after the Coordinates represent the desired zoom, orientation angles and image resolution. You can play around with image formats here https://www.mapbox.com/help/static-api-playground/.

Also note that you have options in Google sheets to adjust how the image is displayed (resize, stretch etc) in the cell, using the IMAGE parameters. This is explained here https://support.google.com/docs/answer/3093333?hl=en

12

solved Passing coordinates values from google sheets columns in static map URL