Better documentation for icon-color example
This commit is contained in:
108
examples/data/geojson/test.geojson
Normal file
108
examples/data/geojson/test.geojson
Normal 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
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -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:
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user