1 | ---
|
2 | layout: example.html
|
3 | title: Icon Colors
|
4 | shortdesc: Example assigning a custom color to an icon
|
5 | docs: >
|
6 | Example assigning a custom color to an icon. The features in this examples are all using the same image with the different colors coming from the javascript file.
|
7 | Note that icon files need to obey the same origin policy or send proper CORS headers for this to work. When relying on CORS headers, the `ol.style.Icon` must be configured with `crossOrigin: 'anonymous'`.
|
8 | tags: "vector, style, icon, marker"
|
9 | resources:
|
10 | ---
|
11 | <div id="map" class="map"></div>
|