<?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: convert Basemaps to grayscale in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63585#M5563</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Apparently IE10 doesn't do DXImageTransform - so has anyone got any ideas how to do this in IE10 ?&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>Fri, 19 Jul 2013 12:56:19 GMT</pubDate>
    <dc:creator>AdrianMarsden</dc:creator>
    <dc:date>2013-07-19T12:56:19Z</dc:date>
    <item>
      <title>convert Basemaps to grayscale</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63576#M5554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am currently trying to find a way if its possible to use dojo or some javascript to convert a basemap image to grayscale.&amp;nbsp; I have successfully turn the entire map div to grayscale using the the following css class&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;.target {filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)} &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the problem is the entire div turns gray when i only want the background image to turn grayscale.&amp;nbsp; I still want my dynamic layers to be color.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas or is there some imageparameter I can set??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 15:08:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63576#M5554</guid>
      <dc:creator>darrenjohnson</dc:creator>
      <dc:date>2011-07-28T15:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: convert Basemaps to grayscale</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63577#M5555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There was a cool demo from this year's UC that does exactly this:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://na.arcgis.com/UCdemo/traffic.html"&gt;http://na.arcgis.com/UCdemo/traffic.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But it doesn't work in IE because it's using canvas to transform the full color tiles to a gray scale tiles. If you absolutely have to use IE, you might be able to use a shim like excanvas but then I'd be worried about performance... Google's Chrome Frame is also a solution if you absolutely have to run in IE.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 15:38:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63577#M5555</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-07-28T15:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: convert Basemaps to grayscale</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63578#M5556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes I must use IE.&amp;nbsp; Not ideal I know, but it must be.&amp;nbsp; I thought I might be getting somewhere with &lt;/SPAN&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;img[src$=".jpg"]{filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)}&lt;/PRE&gt;&lt;SPAN&gt;but i can't seem to find a way to set the image format for a ArcGISTiledMapServiceLayer layer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 15:53:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63578#M5556</guid>
      <dc:creator>darrenjohnson</dc:creator>
      <dc:date>2011-07-28T15:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: convert Basemaps to grayscale</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63579#M5557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;#map_layer0{filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1) }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That little bit of css seems to be working.&amp;nbsp; Don't know if map_layer0 div is a constant though.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 16:59:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63579#M5557</guid>
      <dc:creator>darrenjohnson</dc:creator>
      <dc:date>2011-07-28T16:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: convert Basemaps to grayscale</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63580#M5558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmm...one problem is that URLs for tiles don't have a file extension, see:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/2/0/0" rel="nofollow noopener noreferrer" target="_blank"&gt;http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/2/0/0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;They are added via img tags though so you might be able to do this...here's an example of the HTML for a tile in a tiled service(taken from &lt;/SPAN&gt;&lt;A href="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer?f=jsapi):" rel="nofollow noopener noreferrer" target="_blank"&gt;http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer?f=jsapi):&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;img id="map_layer0_tile_2_0_1" 
&amp;nbsp;&amp;nbsp;&amp;nbsp; class="layerTile" style="left: 450px; top: -126px; width: 256px; height: 256px; visibility: visible; "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; src="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/2/0/1"
&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:26:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63580#M5558</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2021-12-10T22:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: convert Basemaps to grayscale</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63581#M5559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hmm...one problem is that URLs for tiles don't have a file extension, see:&amp;nbsp; &lt;A href="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/2/0/0" rel="nofollow noopener noreferrer" target="_blank"&gt;http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/2/0/0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;They are added via img tags though so you might be able to do this...here's an example of the HTML for a tile in a tiled service(taken from &lt;A href="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer?f=jsapi):" rel="nofollow noopener noreferrer" target="_blank"&gt;http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer?f=jsapi):&lt;/A&gt; &lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;img id="map_layer0_tile_2_0_1" 
&amp;nbsp;&amp;nbsp;&amp;nbsp; class="layerTile" style="left: 450px; top: -126px; width: 256px; height: 256px; visibility: visible; "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; src="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/2/0/1"
&amp;gt;
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;we posted at the exact same time.&amp;nbsp; I'm not sure exactly why this is working but it seems to be.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; img[id*='map_layer'] {filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1) }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .esriBasemapGalleryNode{filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); font-size:small; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #map_layer0{filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1) }
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:26:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63581#M5559</guid>
      <dc:creator>darrenjohnson</dc:creator>
      <dc:date>2021-12-10T22:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: convert Basemaps to grayscale</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63582#M5560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad you got it working!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 20:10:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63582#M5560</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-07-28T20:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: convert Basemaps to grayscale</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63583#M5561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;There was a cool demo from this year's UC that does exactly this:&amp;nbsp; &lt;A href="http://na.arcgis.com/UCdemo/traffic.html"&gt;http://na.arcgis.com/UCdemo/traffic.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This link is broken - do you know if I can find this anywhere else?&amp;nbsp; I need a grayscale map that will work in all browsers - I've got it working in IE, but not Chrome or Firefox.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sarah.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS.&amp;nbsp; I've also just noticed that it only works in IE when zooming - panning around doesn't pull in the new tiles.&amp;nbsp; Back to the drawing board...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 08:25:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63583#M5561</guid>
      <dc:creator>SarahNoakes1</dc:creator>
      <dc:date>2013-02-19T08:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: convert Basemaps to grayscale</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63584#M5562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For Firefox, you'll need to add an svg filter to your page.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://stackoverflow.com/questions/609273/convert-an-image-to-grayscale-in-html-css" rel="nofollow noopener noreferrer" target="_blank"&gt;http://stackoverflow.com/questions/609273/convert-an-image-to-grayscale-in-html-css&lt;/A&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;svg xmlns="http://www.w3.org/2000/svg"&amp;gt;
 &amp;lt;filter id="grayscale"&amp;gt;
&amp;nbsp; &amp;lt;feColorMatrix type="matrix" values="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"/&amp;gt;
 &amp;lt;/filter&amp;gt;
&amp;lt;/svg&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And then the way I do it as I give my layers an "id", so something like&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;osm = new esri.layers.OpenStreetMapLayer({
id: 'osmLayer'
}); &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then in the CSS you can do this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#map_osmLayer img
{
filter: url(filters.svg#grayscale) !important; /* Firefox 3.5+ - notice the svg from above */
filter: gray !important; /* IE5+ */
-webkit-filter: grayscale(1) !important; /* Webkit Nightlies; Chrome Canary */
} &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That way you get control of individual layers, which is pretty cool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have chrome, there is a whole suite of cool css filters you could play with for your basemaps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.odoe.net/apps/mapstyler/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.odoe.net/apps/mapstyler/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:26:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63584#M5562</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-12-10T22:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: convert Basemaps to grayscale</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63585#M5563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Apparently IE10 doesn't do DXImageTransform - so has anyone got any ideas how to do this in IE10 ?&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>Fri, 19 Jul 2013 12:56:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63585#M5563</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2013-07-19T12:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: convert Basemaps to grayscale</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63586#M5564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Still no-one got any ideas for IE10+&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 14:06:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/convert-basemaps-to-grayscale/m-p/63586#M5564</guid>
      <dc:creator>AdrianMarsden</dc:creator>
      <dc:date>2013-10-10T14:06:47Z</dc:date>
    </item>
  </channel>
</rss>

