You are here

openlayers-map-array-styles.html in Openlayers 6

File

help/openlayers-map-array-styles.html
View source
Styles define how features look on a map.  Styles can be defined for the map as a whole, for specific events like when a feature is selected, or for individual features.  Example style array:

<pre>
array(
  'pointRadius' => 5,
  'fillColor' => '#FFCC66',
  'strokeColor' => '#FF9933',
  'strokeWidth' => 2,
  'fillOpacity' => 0.5
);
</pre>

See the following OpenLayers docs as well:

<ul>
<li><a href="http://dev.openlayers.org/docs/files/OpenLayers/Style-js.html">Style Object</a></li>
<li><a href="http://docs.openlayers.org/library/feature_styling.html">Doc Entry for Styles</a></li>
<li><a href="http://trac.openlayers.org/wiki/Styles">Wiki Entry for Styles</a></li>
</ul>

<h3>Style Properties</h3>

See <a href="http://docs.openlayers.org/library/feature_styling.html#style-properties">Style Properties</a> for complete list of properties.

<h3>Context Sensitive Styling</h3>

<strong>TODO</strong>