Example doc and color changes

This commit is contained in:
Andreas Hocevar
2020-07-26 12:13:16 +02:00
parent 2e781afd56
commit c144c7265e
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ layout: example.html
title: Icon Colors
shortdesc: Example assigning a custom color to an icon
docs: >
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.
Example assigning a custom color to an icon. The icon styles in this example use images with a white fill. For some features, custom colors set using the `color` property.
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'`.
tags: "vector, style, icon, marker"
resources:

View File

@@ -29,7 +29,7 @@ const berlin = new Feature({
rome.setStyle(
new Style({
image: new Icon({
color: '#8959A8',
color: '#BADA55',
crossOrigin: 'anonymous',
// For Internet Explorer 11
imgSize: [20, 20],