SearchKml.aspx
上传用户:huiyue
上传日期:2022-04-08
资源大小:1429k
文件大小:3k
源码类别:

搜索引擎

开发平台:

ASP/ASPX

  1. <%@ Page Language="c#" 
  2. Buffer="true"
  3. autoeventwireup="true" 
  4. Inherits="Searcharoo.WebApplication.SearchPageBase" 
  5. ContentType="application/vnd.google-earth.kml+xml" 
  6. %><script runat="server">
  7.       protected override SortedList GetSearchResults(Searcharoo.Engine.Search se)
  8.       {
  9.           return se.GetResults(this.SearchQuery, _Catalog, true); // ONLY Geocoded results
  10.       }
  11.       protected override int MaxResultsPerPage
  12.       {
  13.           get
  14.           {
  15.               return 200; 
  16.           }
  17.       }</script><%@ Register TagPrefix="roo" TagName="SearchPanel" Src="SearchControl.ascx" %><?xml version="1.0" encoding="UTF-8"?>
  18. <kml xmlns="http://www.opengis.net/kml/2.2">
  19.    <Document><asp:Panel runat="server" visible="false">
  20. <roo:SearchPanel id="ucSearchPanelHeader" runat="server"  visible="false" IsSearchResultsPage="false" />
  21. <asp:Panel id="lblNoSearchResults" visible="false" runat="server"></asp:Panel>
  22. </asp:Panel>
  23. <name>Searcharoo Results for: <%=SearchQuery %></name>
  24. <description>The query took <%=_DisplayTime%> and produced <%=_Geocoded%> geocoded results.</description>
  25. <asp:Repeater id="SearchResults" runat="server">
  26.     <ItemTemplate>
  27.         <Placemark>   
  28.             <name><![CDATA[<%# DataBinder.Eval(Container.DataItem, "TitleText") %> ]]></name>
  29.             <description><![CDATA[
  30.                 <%# DataBinder.Eval(Container.DataItem, "DescriptionText") %>
  31.                 <br />
  32.                 <a href="<%# DataBinder.Eval(Container.DataItem, "Url") %>"><img src="<%# DataBinder.Eval(Container.DataItem, "Url") %>" width="120" /></a>
  33.                 <br />
  34.                 Tags: <%# DataBinder.Eval(Container.DataItem, "KeywordString") %>
  35.                 <br />
  36.                 Size: <%# DataBinder.Eval(Container.DataItem, "Size") %>
  37.                 <br />
  38.                 Crawled Date: <%# DataBinder.Eval(Container.DataItem, "CrawledDate") %>
  39.                 <br />
  40.                 Rank: (<%# DataBinder.Eval(Container.DataItem, "Rank") %>)
  41.             ]]></description>
  42.             <Style><IconStyle><Icon><href><%# DataBinder.Eval(Container.DataItem, "Url") %></href></Icon></IconStyle></Style>
  43.             <Point>      
  44.                 <extrude>1</extrude>
  45.         <altitudeMode>relativeToGround</altitudeMode>
  46.                 <coordinates><%# DataBinder.Eval(Container.DataItem, "GpsLocationText")%>,0</coordinates>    
  47.             </Point>
  48.         </Placemark>
  49.     </ItemTemplate>
  50. </asp:Repeater><asp:Panel runat="server" visible="false"><roo:SearchPanel id="ucSearchPanelFooter" runat="server" visible="false" IsSearchResultsPage="true" IsFooter="true"/></asp:Panel>
  51.    </Document>
  52. </kml>