In the script code above, you need to specify the lat and log of the location at the second line then you have to set the zoom level from top view which is 8 by default.
Then the Location image URL and its details you have to mentions inside the "var contentString". You can beautify it with adding some CSS as box. For showing the title you can mentions a tag line inside the marker() function. This code shows the example of PHP which makes it dynamic. The output of this code is shown as in a figure below.