【问题标题】:Highlighting Route on Xamarin Forms Maps Doesn't Work在 Xamarin 表单地图上突出显示路线不起作用
【发布时间】:2017-03-28 17:53:21
【问题描述】:

我一直在关注下一篇文章中的代码,

https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/custom-renderer/map/polyline-map-overlay/

我让它在 iOS 中运行良好,但每当我运行 Android 时 - 折线路线并未绘制在地图上。地图已绘制,但路线未出现。

没有给出错误或警告。

我在 Android CustomMapRenderer (https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/custom-renderer/map/polyline-map-overlay/#Creating_the_Custom_Renderer_on_Android) 中的两个方法中都设置了断点,但都没有命中断点。

对于如何调用这些方法并在 android 应用程序中绘制折线的任何建议将不胜感激。

再次感谢。

【问题讨论】:

  • 把代码放在这里?

标签: android google-maps xamarin.forms


【解决方案1】:

确保您已注册自定义渲染器, [程序集:ExportRenderer(typeof(CustomMap), typeof(CustomMapRenderer))]。相同的示例代码对我来说效果很好。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-15
    • 1970-01-01
    相关资源
    最近更新 更多