Hi,
I load feature using KML :
kml= '<?xml version="1.0" encoding="utf-8"?><kml xmlns="http://www.opengis.net/kml/2.2"><Document><Style id="Style1"> <LineStyle> <color>#ffff55ff</color> <width>3</width> </LineStyle> <PolyStyle> <color>#ffffaaaa</color> <fill>1</fill> <outline>1</outline> </PolyStyle></Style><Placemark id="0"> <styleUrl>#Style1</styleUrl> <Polygon> <extrude>0</extrude> <tessellate>0</tessellate> <altitudeMode>clampToGround</altitudeMode> <outerBoundaryIs> <LinearRing><coordinates> 10.17412778,36.84672090 10.17424823,36.84674061 10.17427628,36.84663085 10.17415582,36.84661114 10.17412778,36.84672090</coordinates></LinearRing> </outerBoundaryIs> </Polygon> </Placemark> </Document></kml>'
var oKmlObject = ge.parseKml( Kml ) ;
if( oKmlObject ) {
ge.getFeatures().appendChild( this.oKmlObject ) ;
}
I want to repalce the KMLStyle by this :
kml= '<Style id="Style1"> <LineStyle> <color>#ff00ffff</color> <width>1</width> </LineStyle> <PolyStyle> <color>#ffffaaaa</color> <fill>0</fill> <outline>1</outline> </PolyStyle></Style>'
the code below does not work :(
var oOldStyle = this.oKmlObject.getElementById( sID ) ;
var oNewStyle = ge.parseKml( Kml ) ;
ge.getFeatures().replaceChild( oNewStyle, oOldStyle );
please any one can help me!