PDA

View Full Version : how to bound to markers



macs
1 May 2012, 4:19 AM
i am extracting a couple of locations from a json which i render on a map by adding markers. i also try to bound the view to the markers like shown below without success. the markers are added but the view remains in palo alto. what would be the way to get the view to bound to the added markers?


addMarker: function (position) {
var marker = new google.maps.Marker({
map: this.mapView._map,
position: position,
bounds: true,
});
},

macs
1 May 2012, 4:47 AM
since i switched from jquery mobile the above code seemed correct. however looking in to the google api, the markeroptions do not have a bounds property. sorry i thought they have. that means I have to get and extend bounds for each marker manually. or is there a sencha touch map property that i overlooked that might do the same?