# OpenLayers: Vector Graphics with Shadows

# Marker Shadows using Background Graphics/Z-Indexes

markers, shadow, style

This example shows off marker shadows using background graphics and z-indexes. Move the features around to show the shadows' interaction.

The features in this map were generated at random. Each of these features have a backgroundGraphic property set in the style map to add a shadow image. Note that the background graphics are not duplicated features with a different style.
The shadows were set to have a different z-index than the markers themselves, using the backgroundGraphicZIndex property. This makes sure all shadows stay behind the markers, keeping a clean look. The shadows were also placed nicely relative to the external graphic using the backgroundXOffset and backgroundYOffset property.
Y-ordering on the layer is enabled. See the ordering example.