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:
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user