Opened 13 years ago

Closed 13 years ago

#53 closed defect (fixed)

Proj4js.Point initializing problem

Reported by: nobilis Owned by: madair
Priority: minor Milestone: 1.0.2
Component: core Version: 1.0.1
Keywords: Cc:

Description

Though I'm not hardcore developer, in my humble opinion this is a bug.

I have a case when I get coordinates from xml and turn them into array as: coords.split(","); Now when I define Point

var p = new Proj4js.Point(coords[0], coords[1]);

I get p.y as undefined. That is because when initializing Point, when x is typeof "string", y is assumed to be in same string.

Inside proj4js-combined.js row 1410: is:

 } else if (typeof x == 'string') {

should be:

 } else if (typeof x == 'string' && typeof y == 'undefined') {

Change History (1)

comment:1 by madair, 13 years ago

Resolution: fixed
Status: newclosed

fixed at rev [1973]. Thanks for the bug report and fix!

Note: See TracTickets for help on using tickets.