Mercator projection getmap() does not convert correct values from radian to degree

alex_b - November 4, 2009 - 23:21
Project:Nice Map
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

In the case of adjustments for targets *wider* than the map, nicemap_mercator_projection::getmap() does correct adjustments in radians, but then converts back the wrong values into degrees:

<?php
$map
['miny'] = rad2deg($map['miny']);
$map['maxy'] = rad2deg($map['maxy']);
?>

It should be:

<?php
$map
['minx'] = rad2deg($map['minx']);
$map['maxx'] = rad2deg($map['maxx']);
?>

Patch coming.

#1

alex_b - November 4, 2009 - 23:22
Assigned to:alex_b» Anonymous
Status:active» needs review

There you go.

AttachmentSize
623744-1_fix_mercator_adjustments.patch 484 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.