$(
    function() {

        function initMap() {
            var myLatLng = {
                lat: parseFloat(window.lat),
                lng: parseFloat(window.lon)
            };

            var map = new google.maps.Map(
                document.getElementById('map'), {
                    center: myLatLng,
                    scrollwheel: false,
                    zoom: 14
                }
            );

            var marker = new google.maps.Marker(
                {
                    position: myLatLng,
                    map: map,
                    title: 'Hello World!'
                }
            );

        }

        window.initMap = initMap();
    }
);
