• Hey guys, this code works outside of wordpress but inside it does not, do any of you know why?

    Thank you!!!

    function LoadGmaps() {
    		var myLatlng = new google.maps.LatLng(51.0363189,-114.0946641);
    		var myOptions = {
    			zoom: 16,
    			center: myLatlng,
    			disableDefaultUI: true,
    			navigationControl: false,
    
    			mapTypeControl: false,
    			mapTypeControlOptions: {
    				style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR
    			},
    			streetViewControl: false,
    			mapTypeId: google.maps.MapTypeId.ROADMAP
    			}
    		var map = new google.maps.Map(document.getElementById("MyGmaps"), myOptions);
    
              var contentString = '<span style="color:#333;font-weight:bold;">#200, 1842 -14 Street SW Calgary AB T2T 3S9</span>';
    
      var infowindow = new google.maps.InfoWindow({
          content: contentString
      });
    
              var image = "images/mapmarker.png";
    		var marker = new google.maps.Marker({
    			position: myLatlng,
    			map: map,
                icon: image,
    			title:"Blackcoffee Studio"
    		});
    
               google.maps.event.addListener(marker, 'click', function() {
        infowindow.open(map,marker);
      });
    	}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Something is wrong with this google maps code’ is closed to new replies.