<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Graphic symbol, Hatch pattern fill - STYLE_FORWARD_DIAGONAL cannot be colored? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577386#M53920</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This still seems to be the case at 3.5 - is that really the case??&amp;nbsp; Amazing oversight surely?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any work a-rounds?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ACM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jul 2013 12:41:42 GMT</pubDate>
    <dc:creator>AdrianMarsden</dc:creator>
    <dc:date>2013-07-22T12:41:42Z</dc:date>
    <item>
      <title>Graphic symbol, Hatch pattern fill - STYLE_FORWARD_DIAGONAL cannot be colored?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577384#M53918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe I haven't looked or experimented enough, but on the API reference page at:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jsapi_start.htm#jsapi/simplefillsymbol.htm"&gt;http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jsapi_start.htm#jsapi/simplefillsymbol.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The part that talks about fill styles for graphics states &lt;/SPAN&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The fill style. See the Constants table for valid values. The default value is STYLE_SOLID. Color is valid only with STYLE_SOLID.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I cannot create a hatch patterned graphic who's hatch lines are not default black?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want a graphic with a red outline and red hatch pattern fill. Can it be done?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 17:20:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577384#M53918</guid>
      <dc:creator>ChrisMcGovern</dc:creator>
      <dc:date>2011-07-20T17:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Graphic symbol, Hatch pattern fill - STYLE_FORWARD_DIAGONAL cannot be colored?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577385#M53919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;2.8 just came out.&amp;nbsp; Maybe the documentation is still dated with 2.7.&amp;nbsp; Have you tried it?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 19:48:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577385#M53919</guid>
      <dc:creator>TrinaNair</dc:creator>
      <dc:date>2012-04-04T19:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Graphic symbol, Hatch pattern fill - STYLE_FORWARD_DIAGONAL cannot be colored?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577386#M53920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This still seems to be the case at 3.5 - is that really the case??&amp;nbsp; Amazing oversight surely?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any work a-rounds?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ACM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 12:41:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577386#M53920</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2013-07-22T12:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Graphic symbol, Hatch pattern fill - STYLE_FORWARD_DIAGONAL cannot be colored?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577387#M53921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This still seems to be the case at 3.5 - is that really the case??&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Still the case at 3.7. Not only that, it is not just Firefox, neither Internet Explorer nor Chrome can apply color or transparency values to hatch patterns. What is up with color for hatch pattern fills in the Javascript API? The ArcGIS for Flex team implemented this a couple years ago.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Dec 2013 17:40:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577387#M53921</guid>
      <dc:creator>MichaelSmith2</dc:creator>
      <dc:date>2013-12-31T17:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Graphic symbol, Hatch pattern fill - STYLE_FORWARD_DIAGONAL cannot be colored?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577388#M53922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The hatch patterns cannot be altered via the api because they are images.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Only STYLE_SOLID will use the color provided. STYLE_SOLID and STYLE_NULL are the only "pure" esri/symbol/SimpleFillSymbol(s).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All the other fill options like STYLE_BACKWARD_DIAGONAL, are actually &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jsapi/picturefillsymbol-amd.html"&gt;esri/symbol/PictureFillSymbol(s)&lt;/A&gt;&lt;SPAN&gt;, which use images that are included in the api &lt;/SPAN&gt;&lt;A href="http://js.arcgis.com/3.7/js/esri/images/symbol/sfs/vertical.png"&gt;http://js.arcgis.com/3.7/js/esri/images/symbol/sfs/vertical.png&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The solution, work-around or what have you is to use esri/symbol/PictureFillSymbol with your own custom images.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 15:11:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577388#M53922</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2014-01-02T15:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Graphic symbol, Hatch pattern fill - STYLE_FORWARD_DIAGONAL cannot be colored?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577389#M53923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you Ben for the description of why it does not work. However, I think this is something that needs to be justified by the Javascript API team as it does not answer the fundamental question of why this is the case to begin with.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The plain fact is the Javascript API team has once again shown it is not as concerned about its user community as the other API teams. The Flex team was able to incorporate this hatch fill capability into their API at least three years ago (when I first used it). My guess is the Flex Team did it because it helps to build new applications more rapidly. I want to change the fill so the graphic features called by a Find function are both color-coded based on whether the graphic is for a jurisdiction, school district, fire district, or water district and show the actual color values of the features under them. Now I have to create four images before I can finish the tools I am working on instead of just coding in a color value and moving on to the next thing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Trust me, if Flex was supported on mobile devices I wouldn't touch the Javascript API. Sure, if you are a full-time coder, their bare bones API and lack of plug-and-play tools is probably fine, but experts are not what ESRI focuses on. When you listen to Jack, ESRI wants everyone to be able to create data, maps, and applications with as little hassle as practical. The other API teams get this. I was able to get my first Flex application up and running within two days (I did not use their application builder) because they release template viewers with each release of their API. After it was up and running I was able to customize it so it looked and performed the way I wanted it to because of the rapid progress I was able to make with the template and tools they developed for their user community. When a group within its user community expressed that they wanted the same thing, the Javascript API team responded that that wasn't their problem as they did not believe in providing template applications as they were personally concerned that that might lead to too many applications in the wild that looked the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;We do not have plans to add a "layer list" or "table of contents" widget to manage map layers and sublayers. We've resisted adding this to the API because we don't want to encourage building generic, kitchen sink style viewers. I realize that we (Esri) do not have a consistent story on this as we still provide generic viewers for other platforms/technologies. We're open to discussing it further, but I personally agree with anti-viewer, anti-portal sentiments that some have expressed online for the past couple of years.&lt;BR /&gt;- Derek Swingley (ArcGIS API for JavaScript Team Member)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, once they did begrudgingly produce a template viewer, they produced something that was so convoluted and hard to build on that I can only suspect that they did it intentionally to prevent anyone from asking them to do it again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The ArcGIS API for Javascript Team, turning ESRI's "GIS for Everyone" slogan into "GIS for Experts and Consultants."&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 17:30:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577389#M53923</guid>
      <dc:creator>MichaelSmith2</dc:creator>
      <dc:date>2014-01-03T17:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Graphic symbol, Hatch pattern fill - STYLE_FORWARD_DIAGONAL cannot be colored?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577390#M53924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As @btfou mentioned, the pattern is displayed via images (background-image css property).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, there is a valid solution to this issue which just hasn't been implemented in the API (yet).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please vote upon the following &lt;/SPAN&gt;&lt;A href="http://ideas.arcgis.com/ideaView?id=087E000000050FiIAI"&gt;idea&lt;/A&gt;&lt;SPAN&gt; which is precisely about this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Meanwhile, you can use the following &lt;/SPAN&gt;&lt;A href="https://github.com/Chaussette/esri.symbol.FillPattern"&gt;solution&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2014 06:43:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577390#M53924</guid>
      <dc:creator>SimonUyttendaele</dc:creator>
      <dc:date>2014-04-16T06:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Graphic symbol, Hatch pattern fill - STYLE_FORWARD_DIAGONAL cannot be colored?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577391#M53925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have just had a quick go with that solution, but I can't seem to get it incorporated into my legacy (nonAMD) code.&amp;nbsp; Any pointers anyone.&amp;nbsp; No obvious error messages.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ACM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;edit - it was this &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #333333; font-family: Consolas;"&gt;&lt;STRONG&gt;if&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas;"&gt;&lt;STRONG&gt;!&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas;"&gt;fill&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas;"&gt;src&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas;"&gt;startsWith&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #DD1144; font-family: Consolas;"&gt;'data:image/png;base64,'&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Consolas;"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; that my code didn't like - removing it and it all works&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #333333; font-family: Consolas;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 13:00:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577391#M53925</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2014-04-23T13:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Graphic symbol, Hatch pattern fill - STYLE_FORWARD_DIAGONAL cannot be colored?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577392#M53926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with other commenters that the non-solid fills in polygons should be able to have different colors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I found that when I define an &lt;STRONG&gt;outline&lt;/STRONG&gt; color for the polygon, the inner hatch will have the same color when printed to a PDF (even though the inner hatch shows black on the app).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This might not be the best solution, but at least users can still have different colors on the printed maps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps someone!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 21:31:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577392#M53926</guid>
      <dc:creator>DanielWebb2</dc:creator>
      <dc:date>2014-07-17T21:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Graphic symbol, Hatch pattern fill - STYLE_FORWARD_DIAGONAL cannot be colored?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577393#M53927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adding some more details for everyone's reference, since I spent too much time trying to solve the same problem...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have a definitive answer but if you look at the documentation for SVG path drawing (&lt;A class="link-titled" href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Fills_and_Strokes" title="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Fills_and_Strokes"&gt;Fills and Strokes - SVG | MDN&lt;/A&gt;&amp;nbsp;), it's actually not technically possible to "fill" with a hatch pattern. &amp;nbsp;This means the symbol would have to manually draw each hatch line as a separate path which would be ugly code and a performance hit. &amp;nbsp;One potential option would be to create a "dynamically colored" image to use as the fill, but I didn't find a simple solution for that either (EDIT: actually that is what's implemented in Simon's solution below, but it uses data:Uri, which aren't fully backward compatible to older browsers). &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I can't really fault the Javascript team for skipping this implementation but a simple note in the docs "if you want a colored hatch fill, (which you probably have in your map service), use a PictureFillSymbol. Here's our black &amp;amp; white ones...." would have saved hours of wasted time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2016 22:31:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-symbol-hatch-pattern-fill-style-forward/m-p/577393#M53927</guid>
      <dc:creator>FredSpataro</dc:creator>
      <dc:date>2016-11-17T22:31:55Z</dc:date>
    </item>
  </channel>
</rss>

