This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
LL_X = -149.348145; longitude
LAYER = 13; zoom level
answers should be
697 for xtile and 2311 for ytile;
I have the xtile working in FileMaker. I believe I am having problems with the deg2rad()conversion. Any help would be appreciated. Both PHP statements work perfectly in PHP.
The FM conversion for ytile is off by about a third.
PHP:
$ytile = floor((1 - log(tan(deg2rad($lat)) + 1 / cos(deg2rad($lat))) / pi()) /2 * pow(2, $zoom));
FM:
Floor((1 - Log(Tan( LL_Y * (Pi / 180)) + 1 / Cos(LL_Y * (Pi / 180))) / Pi) /2 * (2 ^ LAYER))
*/ The FileMaker conversion of the xtile works, so I believe I have the pow() correct. */
PHP:
$xtile = floor((($lon + 180) / 360) * pow(2, $zoom));
FM:
Floor(((LL_X + 180) / 360) * (2 ^ LAYER))