Skip to content
This repository was archived by the owner on Nov 30, 2018. It is now read-only.

Commit 55c0f61

Browse files
committed
Removed validation checks
Just revisited this branch - these validation check are too zealous. They are preventing the map directive from loading when the bounds or center properties are not populated until the Google maps API is ready (eg. with the supplied maps example).
1 parent f91d06a commit 55c0f61

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/coffee/directives/api/map.coffee

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -73,27 +73,6 @@ angular.module('uiGmapgoogle-maps.directives.api')
7373
$log.error 'angular-google-maps: a center or bounds property is required'
7474
return
7575

76-
if angular.isDefined(scope.center) and not @validateCoords(scope.center)
77-
$log.error 'angular-google-maps: the supplied center property (' + scope.center + ') is not valid'
78-
return
79-
80-
if angular.isDefined(scope.bounds)
81-
if !angular.isDefined(scope.bounds.northeast)
82-
$log.error 'angular-google-maps: bounds.northeast property is not defined'
83-
return
84-
85-
if !angular.isDefined(scope.bounds.southwest)
86-
$log.error 'angular-google-maps: bounds.southwest property is not defined'
87-
return
88-
89-
if not @validateCoords(scope.bounds.northeast)
90-
$log.error 'angular-google-maps: bounds.northeast property (' + scope.bounds.northeast + ') is not valid'
91-
return
92-
93-
if not @validateCoords(scope.bounds.southwest)
94-
$log.error 'angular-google-maps: bounds.southwest property (' + scope.bounds.southwest + ') is not valid'
95-
return
96-
9776
# If center is not set, calculate the center point from bounds
9877
if !angular.isDefined(scope.center)
9978
scope.center = new google.maps.LatLngBounds(@getCoords(scope.bounds.southwest), @getCoords(scope.bounds.northeast)).getCenter();

0 commit comments

Comments
 (0)