[OpenLayers-Trac] [OpenLayers] #1571: text layer/format is broken

OpenLayers trac at openlayers.org
Thu Jun 5 18:42:56 EDT 2008


#1571: text layer/format is broken
------------------------+---------------------------------------------------
 Reporter:  tschaub     |       Owner:  crschmidt  
     Type:  bug         |      Status:  new        
 Priority:  minor       |   Milestone:  2.7 Release
Component:  Layer.Text  |     Version:  2.6        
 Keywords:              |       State:             
------------------------+---------------------------------------------------
 The text format does all sorts of parseFloat.  The result of a parseFloat
 is a number or NaN.  The text layer then checks what is the result of
 these parseFloat calls with things like !== null.  If the parseFloat was
 never reached, the values will be undefined.  If the parseFloat was
 reached, the value will be a number or NaN.  Never null.  undefined !==
 null.  The real check the text layer should be doing is testing if the
 value is numeric (see #1441).

 The result of all this is that an icon gets created with an offset where x
 and y properties are NaN.  Much later, this value is added to another
 number and set as a css value with units of "px".  Previously, this
 *appeared* not to be a problem because the Ajax stuff was swallowing
 errors (don't ask me why, I've spent too much time in the IE debugger
 already).  This weird bug raises it's head when applying the new Request
 stuff - which doesn't swallow errors.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/1571>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list