[英]How use a Xamarin.GooglePlayServices.Maps in Xamarin.Forms?
我需要在我的 Xamarin.Forms 應用程序中使用 Xamarin.GooglePlayServices.Maps。 但是我在共享項目(例如 App)中編寫了所有頁面,並且只能在 android 項目(App.Android)中安裝 Xamarin.GooglePlayServices.Maps。 我可以在我的共享項目 (App) 中使用這個包 (Xamarin.GooglePlayServices.Maps) 嗎?
改為下載“Xamarin.Forms.Maps”。 它依賴於“Xamarin.GooglePlayService.Maps”等等。
就像HeroesVII說,安裝Xamarin.Forms.Maps
的Xamarin.Forms。 下面的代碼示例供您參考。
Xamarin.Forms在Android上顯示地圖並與之交互的配置過程為:
有關步驟的詳細信息,您可以查看 MS 文檔。
您可以從下面的鏈接下載源文件。 https://docs.microsoft.com/en-us/samples/xamarin/xamarin-forms-samples/workingwithmaps/
我建議你,因為@HeroesVII 說你應該嘗試 Xamarin.Forms.Maps,它更輕量級和簡單化。 無論哪種方式,如果您想堅持使用 Xamarin.GooglePlayServices.Maps,那么它在標准項目中應該沒有任何問題。
你可以找到和例子在這里以這種回購約我兩天前創建。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.