
Untitled
By: a guest on
Apr 29th, 2012 | syntax:
None | size: 0.92 KB | hits: 11 | expires: Never
function initialize(div,address) {
var map;
var geocoder;
geocoder = new google.maps.Geocoder();
//var latlng = new google.maps.LatLng(-34.397, 150.644);
var myOptions = {
zoom: 12,
//center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById(div), myOptions);
geocoder.geocode( { 'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
} else {
alert("Geocode was not successful for the following reason: " + status);
}
});
return map;
}
and then i do
var map1= new initialize("bidShopMap","Germany");
map1.checkResize(); and i get that object has no checkResize method ....