Packagecom.yahoo.maps.api.markers
Classpublic class SearchMarker
InheritanceSearchMarker Inheritance Marker Inheritance flash.display.Sprite

A Marker object that displays information on a result provided by the local search webservices


Example
   var localSearch:LocalSearch = new LocalSearch();
   localSearch.addEventListener(LocalSearchEvent.SEARCH_SUCCESS, handleSearchSuccess);
   localSearch.searchLocal("pizza", 8, _map.centerLatLon)
  
   function handleSearchSuccess(event:LocalSearchEvent):void 
   {
    var searchResults:LocalSearchResults = event.data as LocalSearchResults;
    var results:Array = searchResults.results;
  
    for each(var item:LocalSearchItem in results)
    {
     var marker:SearchMarker = new SearchMarker(item);
     _map.markerManager.addMarker(marker);
    }
   }
  

See also

LocalSearch
LocalSearchItem


Public Properties
 PropertyDefined by
 Inheritedaddress : Address
The markers location as an Address
Marker
 Inheritedcontainer : Sprite
The container in which all markers are children of.
Marker
 InheriteddragEnabled : Boolean
Determines whether the marker is draggable.
Marker
 InheritedgroupId : String
An ID which you can assign to the marker, to enable you to fetch a group of markers using the MarkerManager.
Marker
 Inheritedlatlon : LatLon
The markers location as a latitude and longitude.
Marker
 Inheritedmanager : MarkerManager
Marker
 Inheritedmap : IYahooMap
A reference to the owning YahooMap instance.
Marker
 InheritedmaxZoom : int
The maximum zoom level this marker should be shown at.
Marker
 InheritedminZoom : int
The minimum zoom level this marker should be shown at.
Marker
Public Methods
 MethodDefined by
  
Creates a new SearchMarker object
SearchMarker
 Inherited
Returns the markers current position as a LatLon object by converting the markers local XY point.
Marker
  
clearAssets():void
Removes all of the objects from the marker in preparation for garbage collection.
SearchMarker
  
close():void
Closes the expanded view of the marker.
SearchMarker
 Inherited
destroy():void
Frees the markers resources in preparation for garbage collection.
Marker
 Inherited
Converts a LatLon object to a local XY point.
Marker
 Inherited
Converts a local XY point to a LatLon object.
Marker
  
open():void
Opens the expanded view of the marker.
SearchMarker
 Inherited
promoteToTop():void
Sets the marker child index (its depth) to the top in the marker container.
Marker
Events
 EventSummaryDefined by
 Inherited  Marker
 Inherited  Marker
 Inherited  Marker
 Inherited  Marker
 Inherited  Marker
 Inherited  Marker
 Inherited  Marker
Constructor detail
SearchMarker()constructor
public function SearchMarker(item:LocalSearchItem)

Creates a new SearchMarker object

Parameters
item:LocalSearchItem
Method detail
clearAssets()method
public function clearAssets():void

Removes all of the objects from the marker in preparation for garbage collection.

close()method 
public function close():void

Closes the expanded view of the marker. Dispatches a MarkerEvent.MARKER_CLOSE event.

open()method 
public function open():void

Opens the expanded view of the marker. Dispatches a MarkerEvent.MARKER_OPEN event.