title: chrome browser doesnt show marker - javascript
body: <p>In firefox, my marker shows fine but in chrome, it doesn't show anything.
  I think chrome doesn't allow me to access to the current user location.
  because marker shows the current location of the user.</p>
  
  <p>my codes:</p>
  
  <pre><code> initialize();
              function initialize()
              {
                  map = new google.maps.Map(document.getElementById('googleMap'), {
                      center: {lat: 35.6961111, lng: 51.4230556},
                      zoom: 13
                  });
              }
  
   getLocation();
              function getLocation() {
                  if (navigator.geolocation) {
                      navigator.geolocation.getCurrentPosition(showPosition);
                  } else {
                      alert("Geolocation is not supported by this browser.");
                  }
              }
              function showPosition(position) {
                  var lat = position.coords.latitude;
                  var lng = position.coords.longitude;
                  getAddress(lat,lng);
                  initialize(lat,lng);
              }
  
  
  
  
              //START FIND LOCATION
  
              var geocoder = new google.maps.Geocoder();
              var marker = null;
              var map = null;
              function initialize(lat,lng) {
                  //var $latitude = document.getElementById('latitude');
                 // var $longitude = document.getElementById('longitude');
                  var latitude = lat;
                  var longitude = lng;
                  var zoom = 16;
  
                  var LatLng = new google.maps.LatLng(latitude, longitude);
  
                  var mapOptions = {
                      zoom: zoom,
                      center: LatLng,
                      panControl: false,
                      zoomControl: false,
                      scaleControl: true,
                      mapTypeId: google.maps.MapTypeId.ROADMAP
                  }
  
                  map = new google.maps.Map(document.getElementById('googleMap'), mapOptions);
                  if (marker &amp;&amp; marker.getMap) marker.setMap(map);
                  marker = new google.maps.Marker({
                      position: LatLng,
                      map: map,
                      title: 'Drag Me!',
                      draggable: true
                  });
  
                  google.maps.event.addListener(marker, 'dragend', function(marker) {
                      var latLng = marker.latLng;
                      getAddress(latLng.lat(),latLng.lng());
                  });
  
  
              }
  </code></pre>
  
  <p>my url:</p>
  
  <p><a href="http://www.khadamatchi.com/frontend/Index/addAddressByUser" rel="nofollow noreferrer">http://www.khadamatchi.com/frontend/Index/addAddressByUser</a></p>