Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I modified your code, this one works for me:-</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;title&gt;Google Map&lt;/title&gt; &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { var map; var infowindow; getGoogleMap('41.033245', '29.110191', '&lt;div class="mapContainer"&gt;&lt;div class="mapContentLeft"&gt;&lt;h1&gt;Hotel Name &lt;i&gt;Information/Suggestion&lt;/i&gt;&lt;/h1&gt;&lt;div&gt;Hotel Image&lt;/div&gt;&lt;/div&gt;&lt;div class="mapContentRight"&gt;&lt;div class="mapHotelStars"&gt;*****&lt;/div&gt;&lt;div class="mapHotelAdress"&gt;Hotel Adress&lt;/div&gt;&lt;div class="mapHotelPrice"&gt; Currency + Integer &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;'); function getGoogleMap(Altitude, Latitude, Address) { var myOptions = { zoom: 10, center: new google.maps.LatLng(-33.9, 151.2), mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("googleMap"), myOptions); infowindow = new google.maps.InfoWindow(); google.maps.event.addListener(map, 'click', function() { infowindow.close(); }); var locations = [ ['Test 5', -33.890542, 151.274856, 5], ['Test 4', -33.923036, 151.259052, 4], ['Test 3', -34.028249, 151.157507, 3], ['Test 2', -33.80010128657071, 151.28747820854187, 2], ['Test 1', -33.950198, 151.259302, 1] ]; for (var i = 0; i &lt; locations.length; i++) { var location = locations[i]; var title = location[0]; var latitude = location[1]; var longitude = location[2]; displayMarker(title, latitude, longitude); } } function displayMarker(title, latitude, longitude) { var latlong = new google.maps.LatLng(latitude, longitude); map.setCenter(latlong); var marker = new google.maps.Marker({ map: map, title: title, icon: "icon.png", position: latlong }); google.maps.event.addListener(marker, 'click', function() { infowindow.setContent(title); infowindow.open(map, marker); }); } }); &lt;/script&gt; &lt;style type="text/css"&gt; .googleMapContainer {width:700px; height:500px;} .mapContainer {border:1px solid red;} &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;form id="form1"&gt; &lt;div class="googleMapContainer" id="googleMap"&gt;&lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload