index.js
// init the google map with marker for user
init the google map with marker for user
init the google map with marker for user
function initMap(lat, lon) {
  var pos = {lat: parseFloat(lat), lng: parseFloat(lon)};
  var contentStr = '<div id="home">' +
    '<p><b>Your Current Location</b></p>' +
    '<p>' + (parseFloat(lat)).toFixed(2) + ' &deg N</p>' +
    '<p>' + (parseFloat(lon)).toFixed(2) + ' &deg W</p>';
  map = new google.maps.Map(document.querySelector('#map'), {
    center: {lat: 39.8, lng: -98.6},
    scrollwheel: true,
    zoom: 4
  });
  var image = 'azure_marker.png';
  var marker = new google.maps.Marker({
    position: pos,
    map: map,
    icon: image
  });
  marker.addListener('click', function() {
    var infoWin = new google.maps.InfoWindow ({
      content: contentStr,
      position: pos
    })
    closeWin();
    infoWin.open(map, this);
    infoWinArr.push(infoWin);
  })
}
function initMap ( lat , lon ) { var pos = { lat : parseFloat ( lat ) , lng : parseFloat ( lon ) } ; var contentStr = '<div id="home">' + '<p><b>Your Current Location</b></p>' + '<p>' + ( parseFloat ( lat ) ) . toFixed ( 2 ) + ' &deg N</p>' + '<p>' + ( parseFloat ( lon ) ) . toFixed ( 2 ) + ' &deg W</p>' ; map = new google . maps . Map ( document . querySelector ( '#map' ) , { center : { lat : 39.8 , lng : - 98.6 } , scrollwheel : true , zoom : 4 } ) ; var image = 'azure_marker.png' ; var marker = new google . maps . Marker ( { position : pos , map : map , icon : image } ) ; marker . addListener ( 'click' , function ( ) { var infoWin = new google . maps . InfoWindow ( { content : contentStr , position : pos } ) closeWin ( ) ; infoWin . open ( map , this ) ; infoWinArr . push ( infoWin ) ; } ) }
init the google map with marker for user
init the google map with marker for user