Open GoogleCodeExporter opened 8 years ago
For anyone else who has run into this bug and needs a solution now, the hack I
am currently using is to create a separate function to manually copy all the
values into the current style for the feature. This causes it to update
directly.
function setStyle(feature,style){
if(feature.getStyleSelector() == null){
feature.setStyleSelector(ge.createStyle(""));
}
// IconStyle
feature.getStyleSelector().getIconStyle().setScale(style.getIconStyle().getScale());
feature.getStyleSelector().getIconStyle().setHeading(style.getIconStyle().getHeading());
feature.getStyleSelector().getIconStyle().setIcon(style.getIconStyle().getIcon());
// LabelStyle
feature.getStyleSelector().getLabelStyle().setScale(style.getLabelStyle().getScale());
// LineStyle
feature.getStyleSelector().getLineStyle().setWidth(style.getLineStyle().getWidth());
// ListStyle
feature.getStyleSelector().getListStyle().setMaxSnippetLines(style.getListStyle().getMaxSnippetLines());
// PolyStyle
feature.getStyleSelector().getPolyStyle().setFill(style.getPolyStyle().getFill());
feature.getStyleSelector().getPolyStyle().setOutline(style.getPolyStyle().getOutline());
// BalloonStyle
feature.getStyleSelector().getBalloonStyle().setText(style.getBalloonStyle().getText());
}
Original comment by rws5...@gmail.com
on 1 Mar 2012 at 7:26
Original issue reported on code.google.com by
rws5...@gmail.com
on 1 Mar 2012 at 5:10Attachments: