Google Static Maps Reference For Addresses:
https://developers.google.com/maps/documentation/maps-static/dev-guide#Addresses
Here's a JavaScript function that I've used recently to do this. The addressElements parameter passed to the function is an array of address elements e.g. ['10 Main St', 'Brownsville', 'MS', '27123', 'USA']
.
You can see that I've commented out the center and zoom properties as you don't need those when you define a marker. To remove the marker, just uncomment those two lines and comment out the markers line.
You can obviously construct this image yourself, but I used the URLSearchParams to simplify parameter creation and have them URL encoded automagically.
function getGoogleMapsImage(addressElements) {
var image = Nucleus.element('img');
image.width = '256';
image.height = '256';
var joined = addressElements.join(',');
var params = new URLSearchParams();
//params.append('center', joined);
//params.append('zoom', '15');
params.append('size', '256x256');
params.append('maptype', 'roadmap');
params.append('key', 'YOUR_API_KEY_HERE');
params.append('markers', 'color:red|label:C|' + joined);
var url = 'https://maps.googleapis.com/maps/api/staticmap?' + params.toString();
image.src = url;
return image;
}