Select to view content in your preferred language

Viewer 3.6 Search Widget: Click on search result, map is empty, only polygon selected

661
3
06-18-2014 09:59 AM
BingJing
Regular Contributor
I used the Search Widget, not Robert's eSearch.  It searches on my basemap layer, the result is correct. But when I click on the search result, only the polygon got highlighted, the map is empty/white. What could have gone wrong? I tried debug but it freezes today.   Thank you for any hint...

The below is from my "config.xml".

<map wraparound180="true" initialextent="-13168303.122125 4000353.263855 -13158160.501175 4014157.475045"
  fullextent="-13168303.122125 4000353.263855 -13158160.501175 4014157.475045" top="40"
  addarcgisbasemaps="true">
 
  <basemaps>
  
   <layer type="dynamic" label="Streets" icon="assets/images/basemap_streets.jpg" imageformat="png8"
   url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer" visible="true" alpha="0.49" />
  
   <layer type="dynamic" label="Streets" icon="assets/images/basemap_streets.jpg" imageformat="png8"  alpha="0.9"
   url="http://babbit:6080/arcgis/rest/services/basemap/MapServer" visible="true"/>
  
  
  </basemaps>
  <operationallayers>
    
   <layer label="Carsonbasemap" type="dynamic" visible='true'
    alpha="0.5" url="http://babbit:6080/arcgis/rest/services/basemap/MapServer">
   </layer>
  
   
   <layer label="Aerial View" type="image" visible="true" alpha="0.28" url="http://coolcat/ArcGIS/rest/services/TIF_1Foot/ImageServer">
   </layer>
     
   <layer label="Street Roads" type="dynamic" visible="true" alpha="1.00" url="http://coolcat/ArcGIS/rest/services/StreetLabels/MapServer">
   </layer>
  </operationallayers>
 
</map>
Tags (2)
0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus
Bing Jing,

  As you zoom back out does the basemap display?
0 Kudos
BingJing
Regular Contributor
No, No matter I Zoom in or out, the map is empty.. can you please help?

See this function below, I am trying to debug.

private function clickSearchResult(event:Event):void
            {
               if (resultFeatureLayer.visible)
                {
                    var searchResult:ResultItem = ItemRenderer(event.target).data as ResultItem;
                    if (searchResult.geometry)
                    {
                        if (searchResult.geometry.type == Geometry.MAPPOINT)
                        {
                            if (map.scale > zoomScale)
                            {
                                map.scale = zoomScale;
                            }
                        }

                        map.zoomTo(searchResult.geometry);
                    }
                    clearTimeout(hitimer);
                    hitimer = setTimeout(showHighlight, 300, [ searchResult ]);
                }
   
            }
0 Kudos
BingJing
Regular Contributor
I debugged the code,  in this line, "map.zoomTo(searchResult.geometry);"  the map object has 20 layers. (see attached screen copy)   That is probably why i got a blank map.   Layer 15 is my basemap, I need map.layer[15] zoom to search result, which is a polygon.

Can you help me here? Thank you.
0 Kudos