Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 29th, 2012  |  syntax: None  |  size: 0.92 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  function initialize(div,address) {
  2.     var map;
  3.     var geocoder;
  4.     geocoder = new google.maps.Geocoder();
  5.     //var latlng = new google.maps.LatLng(-34.397, 150.644);
  6.     var myOptions = {
  7.       zoom: 12,
  8.       //center: latlng,
  9.       mapTypeId: google.maps.MapTypeId.ROADMAP
  10.     }
  11.     map = new google.maps.Map(document.getElementById(div), myOptions);
  12.    
  13.     geocoder.geocode( { 'address': address}, function(results, status) {
  14.       if (status == google.maps.GeocoderStatus.OK) {
  15.         map.setCenter(results[0].geometry.location);
  16.         var marker = new google.maps.Marker({
  17.             map: map,
  18.             position: results[0].geometry.location
  19.         });
  20.       } else {
  21.         alert("Geocode was not successful for the following reason: " + status);
  22.       }
  23.     });
  24.     return map;
  25.   }
  26.  
  27.  
  28. and then i do
  29.  
  30. var map1= new initialize("bidShopMap","Germany");
  31. map1.checkResize(); and i get that object has no checkResize method ....