I am adding google maps to my website and I am able to get my current location but now I want to add markers to differnet places on map.How I can do that?My code to get current location is as:
<div id="map"></div>
<script>
  function initMap() {
    var myLatlng = {lat: 40.59726025535419, lng: 80.02503488467874};
    var map = new google.maps.Map(document.getElementById('map'),{
      center:myLatlng,
    var infoWindow = new google.maps.InfoWindow({map: map});
  // Try HTML5 geolocation.
    if (navigator.geolocation) {
      navigator.geolocation.getCurrentPosition(function(position) {
        var pos = {
          lat: position.coords.latitude,
          lng: position.coords.longitude
        };
        infoWindow.setPosition(pos);
        infoWindow.setContent('Your Location.');
        map.setCenter(pos);
      }, function() {
        handleLocationError(true, infoWindow, map.getCenter());
      });
    } else {
      // Browser doesn't support Geolocation
      handleLocationError(false, infoWindow, map.getCenter());
    }
  }
  function handleLocationError(browserHasGeolocation, infoWindow, pos) {
         infoWindow.setPosition(pos);
    infoWindow.setContent(browserHasGeolocation ?
                          'Error: The Geolocation service failed.' :
                          'Error: Your browser doesn\'t support geolocation.');
  }
</script>
<script async defer
    src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBn7svjyYLYuP-EzakUjobLmpPi41l1_hw&callback=initMap">
</script>
 
     
     
    