Skip to content Skip to sidebar Skip to footer

Google Maps Api V3.22 Reverting To Old Controls

Google yesterday released v3.22 of their maps api which moves a bunch of the standard controls. According to the Google Blog at http://googlegeodevelopers.blogspot.co.uk/2015/09/ne

Solution 1:

They have a typo in the post (and in the documentation)

Issue in the issue tracker

google.maps.controlsStyle = 'azteca';

should be:

google.maps.controlStyle = 'azteca';

code snippet:

var map;

functioninitMap() {
  google.maps.controlStyle = 'azteca'
  map = new google.maps.Map(document.getElementById('map'), {
    center: {
      lat: -34.397,
      lng: 150.644
    },
    zoom: 8
  });
}
google.maps.event.addDomListener(window, 'load', initMap);
html,
body,
#map {
  height: 100%;
  width: 100%;
}
<scriptsrc="https://maps.googleapis.com/maps/api/js"></script><divid="map"></div>

Solution 2:

try this: google.maps.controlStyle = 'azteca';

Post a Comment for "Google Maps Api V3.22 Reverting To Old Controls"