Though the structure is not something we promise will not change, the internal context object is now available to those who parse WMC. r=crschmidt (closes #1370)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@6401 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2008-02-28 21:09:28 +00:00
parent fcd7ecfa3c
commit 145981c303

View File

@@ -87,10 +87,16 @@ OpenLayers.Format.WMC = OpenLayers.Class({
}
var context = this.parser.read(data, options);
var map;
if(options.map instanceof OpenLayers.Map) {
map = this.mergeContextToMap(context, options.map);
if(options.map) {
this.context = context;
if(options.map instanceof OpenLayers.Map) {
map = this.mergeContextToMap(context, options.map);
} else {
map = this.contextToMap(context, options.map);
}
} else {
map = this.contextToMap(context, options.map);
// not documented as part of the API, provided as a non-API option
map = context;
}
return map;
},