/** * Gets a MarkerOption * * @return A new MarkerOption */ public MarkerOptions getMarkerOptions(){ if (mInlineStyle == null){ return null; } return mInlineStyle.getMarkerOptions(); }
public void testHeading() throws Exception { KmlStyle kmlStyle = new KmlStyle(); assertNotNull(kmlStyle); assertNotNull(kmlStyle.getMarkerOptions()); assertEquals(kmlStyle.getMarkerOptions().getRotation(), 0.0f); kmlStyle.setHeading(3); assertEquals(kmlStyle.getMarkerOptions().getRotation(), 3.0f); }
public void testMarkerColor() { KmlStyle kmlStyle = new KmlStyle(); assertNotNull(kmlStyle); assertNotNull(kmlStyle.getMarkerOptions()); }
/** * Sets the inline point style by copying over the styles that have been set * * @param markerOptions marker options object to add inline styles to * @param inlineStyle inline styles to apply * @param markerUrlIconUrl default marker icon URL from shared style */ private void setInlinePointStyle(MarkerOptions markerOptions, KmlStyle inlineStyle, String markerUrlIconUrl) { MarkerOptions inlineMarkerOptions = inlineStyle.getMarkerOptions(); if (inlineStyle.isStyleSet("heading")) { markerOptions.rotation(inlineMarkerOptions.getRotation()); } if (inlineStyle.isStyleSet("hotSpot")) { markerOptions .anchor(inlineMarkerOptions.getAnchorU(), inlineMarkerOptions.getAnchorV()); } if (inlineStyle.isStyleSet("markerColor")) { markerOptions.icon(inlineMarkerOptions.getIcon()); } if (inlineStyle.isStyleSet("iconUrl")) { addMarkerIcons(inlineStyle.getIconUrl(), markerOptions); } else if (markerUrlIconUrl != null) { // Inline style with no icon defined addMarkerIcons(markerUrlIconUrl, markerOptions); } }
MarkerOptions markerOptions = style.getMarkerOptions(); if (inlineStyle != null) { setInlinePointStyle(markerOptions, inlineStyle, style.getIconUrl());