<?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: Bing map (veTileLayer) as basemap in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-map-vetilelayer-as-basemap/m-p/159309#M14871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The bing layer works like other tiled layers in the API so if you don't want your bing layer to be visible initially, pass visible: false to the constructor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The easiest way to be able to get a reference to a bing layer (or any layer for that matter) is to specify an id when creating the layer then pass that id to map.getLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's an example:&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/Srg9n/" rel="nofollow" target="_blank"&gt;http://jsfiddle.net/Srg9n/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Dec 2012 23:15:26 GMT</pubDate>
    <dc:creator>derekswingley1</dc:creator>
    <dc:date>2012-12-18T23:15:26Z</dc:date>
    <item>
      <title>Bing map (veTileLayer) as basemap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-map-vetilelayer-as-basemap/m-p/159307#M14869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am working with the Tax Parcel Viewer template from the local government gallery.&amp;nbsp; I would like to add Bing Maps as a basemap.&amp;nbsp; I was able to modify the CreateBaseMapLayer to add a VeTileLayer as below, but I have two problems.&amp;nbsp; First the Bing Maps basemap draws on load, and the ChangeBaseMap function doesn't work properly.&amp;nbsp; How would I make the Bing layer not visible on load, and how do I get a reference to it using similar to "map.getLayer" so that I can update the ChangeBaseMap function?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;function CreateBaseMapLayer(layerURL, layerId, isVisible,bingKey) { &amp;nbsp;&amp;nbsp;&amp;nbsp; if (isVisible) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; currentBaseMap = layerId; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; if (bingKey.length &amp;gt; 0 ){ &amp;nbsp;&amp;nbsp; veTileLayer = new esri.virtualearth.VETiledLayer({ &amp;nbsp;&amp;nbsp; bingMapsKey: bingKey, &amp;nbsp;&amp;nbsp; mapStyle: esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL &amp;nbsp;&amp;nbsp; }); &amp;nbsp;&amp;nbsp; return veTileLayer&amp;nbsp; }else{ &amp;nbsp; var layer = new esri.layers.ArcGISTiledMapServiceLayer(layerURL, { id: layerId, visible: isVisible }); &amp;nbsp; return layer;&amp;nbsp; } }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2012 18:46:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-map-vetilelayer-as-basemap/m-p/159307#M14869</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2012-12-17T18:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Bing map (veTileLayer) as basemap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-map-vetilelayer-as-basemap/m-p/159308#M14870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Anyone know how to toggle visibility on a Bing Map (veTileLayer)?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 22:38:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-map-vetilelayer-as-basemap/m-p/159308#M14870</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2012-12-18T22:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Bing map (veTileLayer) as basemap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-map-vetilelayer-as-basemap/m-p/159309#M14871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The bing layer works like other tiled layers in the API so if you don't want your bing layer to be visible initially, pass visible: false to the constructor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The easiest way to be able to get a reference to a bing layer (or any layer for that matter) is to specify an id when creating the layer then pass that id to map.getLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's an example:&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/Srg9n/" rel="nofollow" target="_blank"&gt;http://jsfiddle.net/Srg9n/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 23:15:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bing-map-vetilelayer-as-basemap/m-p/159309#M14871</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-12-18T23:15:26Z</dc:date>
    </item>
  </channel>
</rss>

