1

I have embedded a google map on my contact page but the google zoom in/out is not working and also how do I add a info box here is my link

http://www.spheretekk.com/safari/map-lax.html

and here is my screenshot in chrome

http://www.safarikidindia.com/ss.jpg

here is my uodated js

 < script type = "text/javascript" >

 function initialize() {
//Initalize JS after onload
var map = new google.maps.Map(document.getElementById('map_canvas'), {

    mapTypeId: google.maps.MapTypeId.ROADMAP,
});




var randomPoint0 = new google.maps.LatLng(22.59373, 72.94922);
//First Location


var marker0 = new google.maps.Marker({
    //Set up marker
    position: randomPoint0,
    map: map
});

google.maps.event.addDomListener(document.getElementById('locationid0'), 'click', //Set up DOM listener 1
function () {
    map.setZoom(13);
    map.setCenter(marker0.getPosition());

});




var randomPoint1 = new google.maps.LatLng(19.01626, 72.84019);
//First Location
var contentString = '<div id="content">' +
    '<div id="siteNotice">' +
    '</div>' +
    '<h2 id="firstHeading" class="firstHeading">Uluru</h2>' +
    '<div id="bodyContent">' +
    '<p><b>Uluru</b>, also referred to as <b>Ayers Rock</b>, is a large ' +
    'sandstone rock formation in the southern part of the ' +
    'Northern Territory, central Australia. It lies 335 km (208 mi) ' +
    'south west of the nearest large town, Alice Springs; 450 km ' +
    '(280 mi) by road. Kata Tjuta and Uluru are the two major ' +
    'features of the Uluru - Kata Tjuta National Park. Uluru is ' +
    'sacred to the Pitjantjatjara and Yankunytjatjara, the ' +
    'Aboriginal people of the area. It has many springs, waterholes, ' +
    'rock caves and ancient paintings. Uluru is listed as a World ' +
    'Heritage Site.</p>' +
    '<p>Attribution: Uluru, <a href="http://en.wikipedia.org/w/index.php?title=Uluru&oldid=297882194">' +
    'http://en.wikipedia.org/w/index.php?title=Uluru</a> (last visited June 22, 2009).</p>' +
    '</div>' +
    '</div>';

var infowindow = new google.maps.InfoWindow({
    content: contentString
});

var marker1 = new google.maps.Marker({
    //Set up marker
    position: randomPoint1,
    map: map
});

google.maps.event.addDomListener(document.getElementById('city'), 'change', //Set up DOM listener 1
function () {
    map.setZoom(13);
    map.setCenter(marker1.getPosition());

});









map.setCenter(marker0.getPosition());
map.setZoom(5);
 }
 google.maps.event.addListener(marker, 'click', function () {
infowindow.open(map, marker);
 });



 < /script>

What am I missing or doing wrong?

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
San
  • 1,237
  • 1
  • 14
  • 29
  • Can you show the code that is causing the problem? Also, no Google maps is showing on your contact page (in Chrome). – putvande Aug 16 '13 at 08:47
  • possible duplicate of [Google Map Infowindow not showing properly](http://stackoverflow.com/questions/9663375/google-map-infowindow-not-showing-properly) – Dr.Molle Aug 16 '13 at 09:21
  • possible duplicate of [Google Maps API V3 : weird UI display glitches (with screenshot)](http://stackoverflow.com/questions/7471830/google-maps-api-v3-weird-ui-display-glitches-with-screenshot) – geocodezip Aug 16 '13 at 12:49
  • possible duplicate of [google map zoom controls not displaying correctly](http://stackoverflow.com/questions/9904379/google-map-zoom-controls-not-displaying-correctly) – Mo. Feb 25 '14 at 17:10

3 Answers3

2

The issue should be because of universal img{max-width: 100%;}

Try this one in to your css

.gmnoprint img {
    max-width: none; 
}
Mo.
  • 26,306
  • 36
  • 159
  • 225
1

Looks like you haven't added the options for the controls, or at least the zoom control.

https://developers.google.com/maps/documentation/javascript/controls#Adding_Controls_to_the_Map

Based on that it would appear you need to add them just after the Initialize.

MattD
  • 4,220
  • 2
  • 34
  • 44
0

Try this one in to your css

.gmnoprint>* {
    left: 0;
}