Advertisement
Guest User

Untitled

a guest
Jun 28th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. InvalidValueError: setMapTypeId: not a string
  2.  
  3. // Create an array of styles.
  4. var styles = [{
  5. ...
  6. }]
  7.  
  8. var styledMap = new google.maps.StyledMapType(styles,{name: "Styled Map"});
  9. var myOptions = {
  10. ...
  11. }
  12. map = new google.maps.Map(document.getElementById('map_canvas'), myOptions);
  13.  
  14. map.mapTypes.set('map_style', styledMap);
  15. map.setMapTypeId('map_style');
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement