MapControlDataHelper.TransitFeatureClick 事件

定义

当用户点击某个交通功能或使用鼠标左键单击它时发生。 MapControlTransitFeatureClickEventArgs 的实例提供此事件的数据。

注意

此 API 并非适用于所有 Windows 应用。 除非你的开发人员帐户由 Microsoft 专门预配,否则对此 API 的调用将在运行时失败。 有关此 API 和 Windows.Services.Maps.LocalSearch 命名空间的详细信息,请与 Microsoft 帐户团队代表合作。

// Register
event_token TransitFeatureClick(TypedEventHandler<MapControl, MapControlTransitFeatureClickEventArgs const&> const& handler) const;

// Revoke with event_token
void TransitFeatureClick(event_token const* cookie) const;

// Revoke with event_revoker
MapControlDataHelper::TransitFeatureClick_revoker TransitFeatureClick(auto_revoke_t, TypedEventHandler<MapControl, MapControlTransitFeatureClickEventArgs const&> const& handler) const;
public event TypedEventHandler<MapControl,MapControlTransitFeatureClickEventArgs> TransitFeatureClick;
function onTransitFeatureClick(eventArgs) { /* Your code */ }
mapControlDataHelper.addEventListener("transitfeatureclick", onTransitFeatureClick);
mapControlDataHelper.removeEventListener("transitfeatureclick", onTransitFeatureClick);
- or -
mapControlDataHelper.ontransitfeatureclick = onTransitFeatureClick;
Public Custom Event TransitFeatureClick As TypedEventHandler(Of MapControl, MapControlTransitFeatureClickEventArgs) 

事件类型

适用于