Better documentation for icon-color example

This commit is contained in:
Andreas Hocevar
2017-01-11 10:29:00 +01:00
parent 0bf94a35a4
commit 57342a6912
2 changed files with 110 additions and 1 deletions

View File

@@ -0,0 +1,108 @@
{
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"id": "11002A05-",
"properties": {
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
489499,
6658893
],
[
489828,
6659895
],
[
489874,
6659829
],
[
490023,
6659585
],
[
490056,
6659433
],
[
489918,
6658824
],
[
489499,
6658893
]
]
]
}
},
{
"type": "Feature",
"id": "11002A04-",
"properties": {
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
489828,
6659895
],
[
489971,
6659886
],
[
490249,
6659849
],
[
490336,
6659615
],
[
490401,
6658929
],
[
490173,
6658879
],
[
489945,
6658746
],
[
489918,
6658824
],
[
490056,
6659433
],
[
490023,
6659585
],
[
489874,
6659829
],
[
489828,
6659895
]
]
]
}
}
]
}

View File

@@ -3,7 +3,8 @@ layout: example.html
title: Icon Colors title: Icon Colors
shortdesc: Example assigning a custom color to an icon shortdesc: Example assigning a custom color to an icon
docs: > 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 features in this examples are all using the same image with the different colors coming from the javascript file.
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" tags: "vector, style, icon, marker"
resources: resources:
--- ---