i don't want the icon of bing map to overlay my dynamic layer, how to do it?

1068
6
05-17-2011 07:14 PM
shakesvongreen
New Contributor
Tags (2)
0 Kudos
6 Replies
IvanBespalov
Occasional Contributor III
Each com.esri.ags.Map element has com.esri.ags.layers.supportClasses.StaticLayer as child.
This StaticLayer extends spark.components.Group and has childs: Navigation, ScaleBar, Images...

I think you must extend com.esri.ags.Map class and com.esri.ags.layers.supportClasses.StaticLayer class to override bing logo visibility.

This code is simple way to see how many childs in your map component and in default StaticLayer.
In this sample (Bing Maps map styles) added removeMapLogo() function

private function removeMapLogo():void
{
    var staticGroup:Group;
    if (map)
        {
            for (var counter:int = 0; counter<map.numChildren; counter++)
            {
                try
                {
                var mapChild:DisplayObject = map.getChildAt(counter);
                trace(">>> map child " + mapChild.name);
                if (mapChild.name.search("Static") != -1)
                {
                    staticGroup = mapChild as Group;
                }
            }
            catch (error:Error)
            {
                trace(error.getStackTrace());
            }
        }
    }
    
    if (staticGroup)
    {
        for (var indexer:int = 0; indexer<staticGroup.numChildren; indexer++)
        {
            try
            {
                var groupChild:DisplayObject = staticGroup.getChildAt(indexer);
                trace(">>> Static Layer child " + groupChild.name);
                if (groupChild.name.search("Image") != -1)
                {
                    groupChild.visible = false;
                }
            }
            catch (error:Error)
            {
                trace(error.getStackTrace());
            }
        }
    }
}


and bing layer update listener
protected function veLayer_updateCompleteHandler(event:FlexEvent):void
{
    removeMapLogo();
}

<esri:VETiledLayer id="veLayer"
...
updateComplete="veLayer_updateCompleteHandler(event)"/>


I think, what using this code in final application is not good, but you can play with it to understand what is com.esri.ags.Map component.

Good luck.
0 Kudos
BjornSvensson
Esri Regular Contributor
You might also want to take another look at the License Agreement - http://www.esri.com/legal/pdfs/mla_e204_e300/english.pdf

Note under "4.2 Uses Not Permitted", especially point "g":

"g.  Licensee shall not remove or obscure any ESRI or its licensors' patent, copyright, trademark, or proprietary rights notices contained in or affixed to Software, Data, Web Services, or Documentation."
0 Kudos
LSAAssociates
New Contributor II
You might also want to take another look at the License Agreement - http://www.esri.com/legal/pdfs/mla_e204_e300/english.pdf

Note under "4.2 Uses Not Permitted", especially point "g":

"g.  Licensee shall not remove or obscure any ESRI or its licensors' patent, copyright, trademark, or proprietary rights notices contained in or affixed to Software, Data, Web Services, or Documentation."


OK, then why is this an issue with 10.1 and not an issue with 10.0. In fact, why is this a recent issue with 10.1 and using the Bing Map layer files? I mean I know as professionals we have to ALWAYS source our datasets on our maps, but why has Bing Maps recently added their logo (which, by the way means that all PDFs created are rasterized) to the lower left and then added a source line to the lower right (Which is not even complete! The lower right tag line ends in "AND"!). I am just curious.... I will get off my soap box now.
0 Kudos
BjornSvensson
Esri Regular Contributor
The lower right tag line ends in "AND"!).

"AND" (Automotive Navigation Data) is a Dutch data company (with a hard-to-google company abbreviation).
0 Kudos
CerpesStogui
New Contributor
So i am not getting it should we downgrade to 10.0 to be able to use this API?
0 Kudos
RhettZufelt
MVP Frequent Contributor
So i am not getting it should we downgrade to 10.0 to be able to use this API?


I don't see the lower right copyright stuff, but the Bing logo has been in the lower left since at least 9.3.1 and I am now in 10.0 and it is still there.

R_
0 Kudos