Title: Something is wrong with this google maps code
Last modified: August 22, 2016

---

# Something is wrong with this google maps code

 *  [tomicicivan](https://wordpress.org/support/users/tomicicivan/)
 * (@tomicicivan)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/something-is-wrong-with-this-google-maps-code/)
 * 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)

 *  [totaltec](https://wordpress.org/support/users/totaltec/)
 * (@totaltec)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/something-is-wrong-with-this-google-maps-code/#post-5275731)
 * Where are you putting it? Can you give us a link to the page? Any JavaScript 
   errors in the console?

Viewing 1 replies (of 1 total)

The topic ‘Something is wrong with this google maps code’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [totaltec](https://wordpress.org/support/users/totaltec/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/something-is-wrong-with-this-google-maps-code/#post-5275731)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
