Opened 15 years ago

Closed 15 years ago

#29 closed defect (fixed)

error when SRS definition not found

Reported by: madair Owned by: madair
Priority: major Milestone: 1.0.0
Component: core Version: 1.0.0
Keywords: Cc:

Description (last modified by madair)

hi guys,

I've seen a little error when Proj4js doesn't find the SRS definition . In the function parseDefs, the property this.defData is null so a JS error appear when we try to split it

Is it possible to fix this in the trunk it's just a "if" to add :

/

  • Function: parseDefs
  • Parses the PROJ.4 initialization string and sets the associated properties.

* */

parseDefs: function() {

this.defData = Proj4js.defs[this.srsCode]; var paramName, paramVal; if (this.defData) {

var paramArray=this.defData.split("+");

thanks in advance

Olivier Terral Developpeur GEOMATYS

Change History (2)

comment:1 by madair, 15 years ago

Description: modified (diff)

comment:2 by madair, 15 years ago

Resolution: fixed
Status: newclosed

fixed at rev 1536

root cause was using Proj4js.extend to set the defsData in the case where loading of defs fail. Change that to string copy and add the check is parseDefs.

Note: See TracTickets for help on using tickets.