Permalink
Browse files

Better documentation for icon-color example

  • Loading branch information...
1 parent 0bf94a3 commit 57342a69128e102868e364baf749cb1dcd41fc0d @ahocevar ahocevar committed Jan 11, 2017
Showing with 110 additions and 1 deletion.
  1. +108 −0 examples/data/geojson/test.geojson
  2. +2 −1 examples/icon-color.html
@@ -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 @@
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 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"
resources:
---

0 comments on commit 57342a6

Please sign in to comment.