| Package | com.yahoo.maps.api.markers |
| Class | public class SearchMarker |
| Inheritance | SearchMarker Marker flash.display.Sprite |
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
| Method | Defined by | ||
|---|---|---|---|
|
SearchMarker(item:LocalSearchItem)
Creates a new SearchMarker object
| SearchMarker | ||
![]() |
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 | ||
![]() |
destroy():void
Frees the markers resources in preparation for garbage collection.
| Marker | |
![]() |
getLatLonToLocalPoint(latlon:LatLon):Point
Converts a LatLon object to a local XY point.
| Marker | |
![]() |
getLocalPointToLatLon(point:Point):LatLon
Converts a local XY point to a LatLon object.
| Marker | |
|
open():void
Opens the expanded view of the marker.
| SearchMarker | ||
![]() |
promoteToTop():void
Sets the marker child index (its depth) to the top in the marker container.
| Marker | |
| SearchMarker | () | constructor |
public function SearchMarker(item:LocalSearchItem)Creates a new SearchMarker object
Parametersitem:LocalSearchItem |
| clearAssets | () | method |
public function clearAssets():voidRemoves all of the objects from the marker in preparation for garbage collection.
| close | () | method |
public function close():voidCloses the expanded view of the marker. Dispatches a MarkerEvent.MARKER_CLOSE event.
| open | () | method |
public function open():voidOpens the expanded view of the marker. Dispatches a MarkerEvent.MARKER_OPEN event.