Reputation: 1361
I am using the following code to drag in google maps with a single marker:
$('#mapx').gmap({'callback':function(){
var self=this;
var scope=latitude+','+longitude;
self.addMarker({'position':scope, 'bounds':true}).click(function(){
self.openInfoWindow({'content': 'Hello World'),this);
});
}});
which is working fine although the map appears at the maximum zoom size. I have tried various methods from the documentation to set the zoom but can not get anything to work with this code.
$('#mapx').gmap({'option', 'zoom', 7});
The above does not seem to work but I think this may be the location of this line in my code.
Upvotes: 0
Views: 142
Reputation: 60105
Try this:$('#map_canvas').gmap('option', 'zoom', 7);
, there are no curly brackets.
Upvotes: 0