[ka-Map-dev] [Bug 1351] New: modify map/layer constructors to take
objects rather than a fixed argument list
bugzilla-daemon at bugzilla.maptools.org
bugzilla-daemon at bugzilla.maptools.org
Sun Mar 12 14:31:14 EST 2006
http://bugzilla.maptools.org/show_bug.cgi?id=1351
Summary: modify map/layer constructors to take objects rather
than a fixed argument list
Product: ka-Map
Version: 0.2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: core
AssignedTo: ka-map-dev at lists.maptools.org
ReportedBy: pspencer at dmsolutions.ca
The purpose of this is to simplify passing values to object constructors. Currently _map and _layer
constructors take a long list of arguments. Modifying this list is error prone. An alternate approach is
to pass a javascript object with properties that have the argument values:
new _map({name:'name',scales:new Array(1000,500,250)});
inside the _map constructor, values are accessed as:
function _map( o ) {
this.name = o.name?o.name:'default map name';
}
This mechanism makes it easier and less error prone to pass more/less information to the constructor
and provide reasonable defaults
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Please do NOT reply to this email, use the link above instead to
login to bugzilla and submit your comment. Any email reply to this
address will be lost.
More information about the ka-Map-dev
mailing list