none
v7 tile layers - how to access by name? RRS feed

  • Question

  • function LoadElevation()
    {
        var bathyTileSource1 = new VETileSourceSpecification("elevation", "http://url/%4.png");
        bathyTileSource1.NumServers = 1;
        bathyTileSource1.MinZoomLevel = 4;
        bathyTileSource1.MaxZoomLevel = 7;
        bathyTileSource1.ZIndex = 35;
        map.AddTileLayer(bathyTileSource1, false);
    }
    
    function HideElevation()
    {
       map.HideTileLayer("elevation");
    }
    
    function ShowElevation()
    {
      map.ShowTileLayer("elevation");
    }
    
    

    I've got the above v6.3 tile layer code, and I am trying to convert it to v7.0

    It was quite convenient when creating a v6.3 custom tile layer, to associate a name to it (e.g. "elevation" above); I could then Show or Hide that layer by passing the name. It doesnt appear that this convenience is available in v7. What is the suggested way to create, access, and modify multiple tilelayers? I suppose predeclaring a var for each tile layer and setting visibility respectively?

    Friday, March 30, 2012 11:34 PM

Answers

All replies