gmaps.init.js 1.04 KB
$(
    function() {

        function initMap() {
            var newLat = window.lat;
            var lng = window.lon;
            var styles = [{
                stylers: [
                    { saturation: -100 }
                ]
            }];
            map = new GMaps({
                el: '#map',
                lat: newLat,
                lng: lng,
                zoomControl: true,
                zoomControlOpt: {
                    style: 'SMALL',
                    position: 'TOP_LEFT'
                },
                panControl: false,
                streetViewControl: false,
                mapTypeControl: false,
                overviewMapControl: false,
                scrollwheel: false,
                draggable: false,
                styles: styles,
                zoom: 14
            });

            var image = '/img/marker2.png';

            map.addMarker({
                lat: newLat,
                lng: lng,
                icon: image
            });
        }

        window.initMap = initMap();
    }
);