ios - CLLocation accepts longitude and latitude greater or less than their min and max values -


as far know, max , min values are:
latitude: [-90, 90]
longitude: [-180, 180]

cllocation still accepts values beyond these limits, example:

 [[cllocation alloc] initwithlatitude:100.0 longitude:-200.0]; 

and distancefromlocation: function of cllocation still returns valid distance (though cannot verify since coordinates beyond limits).

why so?
thinking along following lines:
1. values beyond limits correspond outerspace
2. values beyond limits correspond other dimensions
3. values beyond limits remap valid value within range [-90, 90] or [-180, 180].

the latitude , longitude type of cllocationdegrees:

//from cllocation.h /*  *  initwithlatitude:longitude:  *    *  discussion:  *    initialize specified latitude , longitude.  */ - (id)initwithlatitude:(cllocationdegrees)latitude     longitude:(cllocationdegrees)longitude; 

in if observe further type of double:

//from cllocation.h /*  *  cllocationdegrees  *    *  discussion:  *    type used represent latitude or longitude coordinate in degrees under wgs 84 reference  *    frame. degree can positive (north , east) or negative (south , west).    */ typedef double cllocationdegrees; 

what range of double in objective-c?

hence believe there no built in check-in of value supplied both latitude , longitude.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -