Select to view content in your preferred language

How can I web map service published by Dojo in Flex app

623
1
12-06-2012 09:01 AM
DeeptiPuri
Deactivated User
We want to include a base map layer in hosted Flex app. We requested web map service from the vendor and I got a file (.htm) from client with some dojo code. I can understand the code but I am not sure how can I include this in my flex app configuration:


      
       // info used to create web tile layers
        var mapurl  = "http://bnvnbvnn/${0}/${2}/${1}.png"
  var lyr = new esri.layers.WebTileLayer(mapurl);
        // clear out the side bar
        //dojo.byId("leftPane").innerHTML = "";
        // create and add the layers
        //var layerDiv = dojo.create("div");
        map.addLayer(lyr);

  


If I will replace variables on URL, I can see images but how will I use this for Flex configuration- where it comes like this:

     <layer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
    visible="true" type="tiled" label="ArcGIS Streets"/>

I have never worked with Dojo toolkit, so I have no idea (or may be there is some communication gap)

Thanks
Tags (2)
0 Kudos
1 Reply
BjornSvensson
Esri Regular Contributor

       // info used to create web tile layers
        var mapurl  = "http://bnvnbvnn/${0}/${2}/${1}.png"
var lyr = new esri.layers.WebTiledLayer(mapurl);

The generic WebTiledLayer that was added to the JavaScript API will also be part of the next version of the Flex API (coming this month).  However, it will not be part of the Flex Viewer.  If you are working with the source code for the Flex Viewer, you could still take advantage of the new WebTiledLayer...
0 Kudos