wxYahooMaps is wxWidgets-based wrapper around Yahoo! Maps Image API. wxYahooMaps allow downloading map images by specifying location details (such as coordinates, address or description). wxYahooMaps downloads images asynchronously, this means that each image is downloaded in separate thread and GUI thread receives notification when downloading is completed. This allows simultaneous downloading of multiple images whuch can be very convenient.
Downloads
Related links
- wxYahooMaps homepage at Google Code
- Yahoo! Map Image API homepage
- Retrieve Application ID for your software
- Runtime Type Information Library for PPC 2003
Screenshots
Usage
wxYahooMap * m_YahooMap;
...
BEGIN_EVENT_TABLE( wxYahooMapsTestMainFrame, wxFrame )
EVT_YAHOO_MAP_STATUS(wxID_ANY, wxYahooMapsTestMainFrame::OnYahooMapStatus)
END_EVENT_TABLE()
...
void wxYahooMapsTestMainFrame::OnYahooMapStatus(wxYahooMapStatusEvent & event)
{
if(event.GetInt() == 0)
{
wxBitmap * bmp = event.GetBitmap();
if(bmp)
{
m_Canvas->SetMap(*bmp);
wxDELETE(bmp);
}
}
else
{
wxMessageBox(event.GetString());
}
}
...
void wxYahooMapsTestMainFrame::OnGOBUTTONClick( wxCommandEvent& event )
{
TransferDataFromWindow();
m_YahooMap->SetApplicationID(m_AppID);
m_YahooMap->SetUsePosition(m_UsePosition);
m_YahooMap->SetPosition(wxRealPoint(m_Longitude, m_Latitude));
m_YahooMap->SetStreet(m_Street);
m_YahooMap->SetCity(m_City);
m_YahooMap->SetState(m_State);
m_YahooMap->SetZIPCode(m_ZIPCode);
m_YahooMap->SetImageType(wxYahooMap::IntToYahooMapImageType(m_ImageType));
m_YahooMap->SetImageSize(wxSize(m_ImageWidth, m_ImageHeight));
m_YahooMap->SetZoomLevel(m_ZoomLevel);
m_YahooMap->StartDownloading();
}



