Show Preview
Show Cesium Code
Show Google Earth Code
For Google Earth Developers
All Google Earth examples
Additional Resources
Tutorials
Cesium Sandcastle
Reference Documentation
Relevant Cesium Source
Relevant Google Earth Source (
link
)
// Apply stylemap to a placemark var styleMap = ge.createStyleMap(''); // Create normal style for style map var normalStyle = ge.createStyle(''); var normalIcon = ge.createIcon(''); normalIcon.setHref('http://maps.google.com/mapfiles/kml/shapes/triangle.png'); normalStyle.getIconStyle().setIcon(normalIcon); // Create highlight style for style map var highlightStyle = ge.createStyle(''); var highlightIcon = ge.createIcon(''); highlightIcon.setHref('http://maps.google.com/mapfiles/kml/shapes/square.png'); highlightStyle.getIconStyle().setIcon(highlightIcon); styleMap.setNormalStyle(normalStyle); styleMap.setHighlightStyle(highlightStyle); // Apply stylemap to a placemark placemark.setStyleSelector(styleMap);