Skip to content

Commit

Permalink
Minor code reformating.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjlandau committed Nov 24, 2010
1 parent 2788a1c commit dbff5af
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions jquery.jmapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,14 @@

var getBounds = function(doUpdate){
var places_data = getPlacesData(doUpdate),
newBounds, swPoint, nePoint;
newBounds, initialPoint;

if(places_data.length){
nePoint = swPoint = places_data[0].point;
if (places_data.length){
initialPoint = $.jMapping.makeGLatLng(places_data[0].point);
}else{
nePoint = swPoint = settings.default_point;
initialPoint = $.jMapping.makeGLatLng(settings.default_point);
}
newBounds = new google.maps.LatLngBounds(
$.jMapping.makeGLatLng(swPoint),
$.jMapping.makeGLatLng(nePoint) );
newBounds = new google.maps.LatLngBounds(initialPoint, initialPoint);

for (var i=1, len = places_data.length; i<len; i++) {
newBounds.extend($.jMapping.makeGLatLng(places_data[i].point));
Expand Down

0 comments on commit dbff5af

Please sign in to comment.