[OpenLayers-Dev] Format/GML/Base.js problem with multiple typenames
Alexandre Dube
adube at mapgears.com
Fri Nov 7 16:59:21 EST 2008
Hi devs again,
I also had an other problem trying to display more than one typename
in the same vector layer. I had to modify ../Format/GML/Base.js near
line 305. Here goes :
//Before :
if(local == this.featureType) {
...
//After :
var bFound = false;
var aszFeatureTypes = this.featureType.split(',');
for (i=0; i<aszFeatureTypes.length; i++){
if(local == aszFeatureTypes[i]) {
bFound = true;
break;
}
}
if(bFound) {
...
"this.featureType" contained all 3 names, like "foo1,foo2,foo3" so the
comparison was always false. That new way, it checks from each possible
types, considering they are comma separated.
BTW, I'm not quite sure I what I'm currently doing ( write on dev
mailing list ) about theses changes is the correct way to do. I guess
I'm still too newb to all this and not sure if I should open tickets or
show my changes here first. Any comments on that ?
Any comments on the changes ?
--
Alexandre Dubé
Mapgears
www.mapgears.com
More information about the Dev
mailing list