Packagecom.yahoo.maps.webservices.local
Classpublic class LocalSearch
InheritanceLocalSearch Inheritance flash.events.EventDispatcher

The LocalSearch class enables you to access Yahoo!'s extensive databases of local businesses and consumer ratings and locations and use its returned data to display POIs on your map.


Example
   var localSearch:LocalSearch = new LocalSearch();
   localSearch.addEventListener(LocalSearchEvent.SEARCH_SUCCESS, handleSearchSuccess);
   localSearch.searchLocal("pizza", 8, _map.centerLatLon)
  
   function handleSearchSuccess(event:LocalSearchEvent):void 
   {
    // handle event
   }
  



Public Methods
 MethodDefined by
  
Creates a LocalSearch object
LocalSearch
  
searchLocal(query:String, zoomLevel:int, latlon:LatLon, radius:Number = 2.8, begin:Number = 1, per_page:Number = 25, categoryFilter:String = null, ratingFilter:String = null):void
Sends a search request to the Yahoo! Local API
LocalSearch
Events
 EventSummaryDefined by
   Dispatched only if the request failed, the XML did not parse or there was no results.LocalSearch
   Dispatched when the request was successful and there was at least one result.LocalSearch
Constructor detail
LocalSearch()constructor
public function LocalSearch()

Creates a LocalSearch object

Method detail
searchLocal()method
public function searchLocal(query:String, zoomLevel:int, latlon:LatLon, radius:Number = 2.8, begin:Number = 1, per_page:Number = 25, categoryFilter:String = null, ratingFilter:String = null):void

Sends a search request to the Yahoo! Local API

Parameters
query:String — The search query.
 
zoomLevel:int — The specified zoom level to search on
 
latlon:LatLon — The center location to search from
 
radius:Number (default = 2.8) — The radius in miles from the center latlon point to search in.
 
begin:Number (default = 1) — A number which specifies the starting index.
 
per_page:Number (default = 25) — How many results to return on each page.
 
categoryFilter:String (default = null) — The category filter key used to filter search results
 
ratingFilter:String (default = null) — The rating filter key used to filter search results
Event detail
searchFailureevent 
Event object type: LocalSearchEvent

Dispatched only if the request failed, the XML did not parse or there was no results.

searchSuccessevent  
Event object type: LocalSearchEvent

Dispatched when the request was successful and there was at least one result.