// When the window has finished loading create our google map below google.maps.event.addDomListener(window, 'load', init); function init() { // Basic options for a simple Google Map // For more options see: https://developers.google.com/maps/documentation/javascript/reference#MapOptions var mapOptions = { // How zoomed in you want the map to start at (always required) zoom: 11 , // The latitude and longitude to center the map (always required) center: new google.maps.LatLng(59.329323, 18.068581), // Sweden // How you would like to style the map. // This is where you would paste any style found on Snazzy Maps. styles: [ { "featureType": "all" , "elementType": "all" , "stylers": [ { "visibility": "on" } ] } , { "featureType": "administrative.country" , "elementType": "geometry.fill" , "stylers": [ { "visibility": "off" } ] } , { "featureType": "landscape.natural" , "elementType": "geometry.fill" , "stylers": [ { "visibility": "on" } , { "color": "#b0e8dc" } ] } , { "featureType": "landscape.natural.landcover" , "elementType": "geometry.fill" , "stylers": [ { "saturation": "0" } ] } , { "featureType": "poi" , "elementType": "geometry.fill" , "stylers": [ { "visibility": "on" } , { "color": "#c0e8e8" } ] } , { "featureType": "road" , "elementType": "geometry" , "stylers": [ { "lightness": 100 } , { "visibility": "on" } , { "color": "#eac272" } , { "gamma": "1" } ] } , { "featureType": "road" , "elementType": "labels" , "stylers": [ { "visibility": "off" } ] } , { "featureType": "transit.line" , "elementType": "geometry" , "stylers": [ { "visibility": "on" } , { "lightness": 700 } ] } , { "featureType": "water" , "elementType": "all" , "stylers": [ { "color": "#60b8bb" } , { "lightness": "0" } , { "saturation": "-25" } ] } ] }; mapOptions = $.extend({ navigationControl: false, mapTypeControl: false, scaleControl: false, draggable: true, gestureHandling: 'greedy', }, mapOptions); // Get the HTML DOM element that will contain your map // We are using a div with id="map" seen below in the var mapElement = document.getElementById('map'); // Create the Google Map using our element and options defined above var map = new google.maps.Map(mapElement, mapOptions); // Let's also add a marker while we're at it //var image = 'images/icons/mapmarker.svg'; var image = { url: 'images/icons/mapmarker.svg', scaledSize: new google.maps.Size(100, 100) } var marker = new google.maps.Marker({ position: new google.maps.LatLng(59.329323, 18.068581) , map: map , optimized: false , icon: image }); }