public String getKMLStyle(String label, Folder folder) { if (kmlStyles.containsKey(label)) return (String) kmlStyles.get(label); int pushpingLinkCounter = kmlStylesCounter % kmlPushPings.length; int colorCounter = kmlStylesCounter % kmlColors.length; Style style = folder.createAndAddStyle().withId( String.valueOf(kmlStylesCounter)); style.createAndSetIconStyle() .withScale(1.399999976158142) .withIcon( new Icon().withHref(kmlPushPings[pushpingLinkCounter])); style.createAndSetLineStyle().withColor(kmlColors[colorCounter]) .withWidth(2); style.createAndSetPolyStyle().withColor(kmlColors[colorCounter]); kmlStyles.put(label, String.valueOf(kmlStylesCounter)); kmlStylesCounter++; return String.valueOf(kmlStylesCounter - 1); } private String getKMLLabel(SimpleFeature feature) {
sf.setVisibility(false); sf.createAndAddStyle().withId("Valid") .withIconStyle( validIconStyle ) .withLabelStyle(labelStyle) .withBalloonStyle(balloonStyle); sf.createAndAddStyle().withId("Invalid") .withIconStyle( invalidIconStyle ) .withLabelStyle( labelStyle ) .withBalloonStyle( balloonStyle ); sf.createAndAddStyle().withId("track") .withLineStyle( lineStyle_t ) .withIconStyle( trackIconStyle )
.withName(worksheet.getTitle()).withOpen(true); Style style = folder.createAndAddStyle().withId("karma");