[OpenLayers-Trac] [OpenLayers] #3570: No Such Method "wkt.replace" Error

OpenLayers trac-20090302 at openlayers.org
Mon Nov 7 10:02:48 EST 2011


#3570: No Such Method "wkt.replace" Error
------------------------+---------------------------------------------------
 Reporter:  bcrosby     |       Owner:  tschaub     
     Type:  bug         |      Status:  new         
 Priority:  major       |   Milestone:  2.12 Release
Component:  Format.WKT  |     Version:  2.11        
 Keywords:              |       State:              
------------------------+---------------------------------------------------
 Using the following code results in an error:

 wkt.read(theroute.geometry.getVertices(true)[0]);

 Uncaught TypeError: Object POINT(-12692642.7742745 6641483.83032314) has
 no method 'replace'
 OpenLayers.Format.WKT.OpenLayers.Class.readOpenLayers.js: 327

 Removing the following code (from line 327) fixes the problem:

 wkt=wkt.replace(/[\n\r]/g," ");

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


More information about the Trac mailing list