title: Google map api : How to add my own markers to a map?
body: <p>first: english is not my language, but I try :-)</p>
  
  <p>I like to have a map with markers.
  The map without marker works fine, you can see it here: <a href="http://myrange.de/support/test.php" rel="nofollow">map without markers</a></p>
  
  <p>The code is just simple:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;MyRange Driving Ranges world wide &lt;/title&gt;
  &lt;meta name="viewport" content="initial-scale=1.0, user-scalable=yes" /&gt;
  
  &lt;style type="text/css"&gt;
  html { height: 100% }
  body { height: 100%; margin: 30px; padding: 0px }
  #map_canvas { height: 80% }
  &lt;/style&gt;
  &lt;script type="text/javascript"
  src="https://maps.google.com/maps/api/js?sensor=true"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  function initialize() {
  var latlng = new google.maps.LatLng(51.1601369818597, 6.72036588191986);
  var myOptions = {
    zoom: 16,
    center: latlng,
    mapTypeId: google.maps.MapTypeId.HYBRID
  };
  var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
  
  //var image = 'http://myrange.de/support/images/flag_red_big.png';
  //var myLatLng = new google.maps.LatLng(51.1601369818597, 6.72036588191986));
  //var golfMarker = new google.maps.Marker({ position: myLatLng,map: map, icon: image });
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body onload="initialize()"&gt;
  &lt;div align="center" id="map_canvas" style="width:100%; height:100%"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>all works fine. If I delete the // than I get an empty screen :-(
  what is wrong in this 3 lines?</p>
  
  <pre><code>var image = 'http://myrange.de/support/images/flag_red_big.png';
  var myLatLng = new google.maps.LatLng(51.1601369818597, 6.72036588191986));
  var golfMarker = new google.maps.Marker({ position: myLatLng,map: map, icon: image });
  </code></pre>
  
  <p>I hope you can understand my "english"</p>
  
  <p>greetings from germany
  hape42</p>