How to display an image from the database in google maps infowindow?

here is my code for the contentString for the infoWindow

var contentstring = '<div id="content">'+
'<div id="siteNotice">'+
'<img src="images/img5.jpg" height="100" width="100" />' +
'<h1 id="firstHeading" class="firstHeading">Uluru</h1>'+
'<div id="bodyContent">'+
'<p><b>Uluru</b>, also referred to as <b>Ayers Rock</b>, is a large ' +
'sandstone rock formation in the southern part of the '+
'Northern Territory, central Australia. It lies 335 km (208 mi) '+
'south west of the nearest large town, Alice Springs; 450 km '+
'(280 mi) by road. Kata Tjuta and Uluru are the two major '+
'features of the Uluru - Kata Tjuta National Park. Uluru is '+
'sacred to the Pitjantjatjara and Yankunytjatjara, the '+
'Aboriginal people of the area. It has many springs, waterholes, '+
'rock caves and ancient paintings. Uluru is listed as a World '+
'Heritage Site.</p>'+
'<p>Attribution: Uluru, <a href="…
'</a></a> '+
'(last visited June 22, 2009).</p>'+
function placeMarker(location) {
var marker = new google.maps.Marker({
position: location,
map: map,
title: 'Uluru (Ayers Rock)'
var infowindow = new google.maps.InfoWindow({
content: contentstring //'Latitude: ' + + '<br>Longitude: ' + location.lng()
//deleting a marker on right click...................................…
google.maps.event.addListener(marker, 'rightclick', function(event) {

google.maps.event.addDomListener(windo… 'load', initialize);

the contentString is just a demo part. i want to display an image in the first div in contentString from the database. can anyone tell me what can i do to make it right.....

1 answer

This widget could not be displayed.

How is any of this relevant to the Atlassian product stack? You may want to try instead.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 3 hours ago in Statuspage

What are your best incident management tips and stories? #HugOps

 👋Community members! Downtime happens. And great incident response takes a village. Teams like Support, Dev, SRE, Ops, IT, and Marketing have to come together to resolve the problem while keep...

19 views 0 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you