c# - 如何在 Xamarin.Android 中更新 Maps SDK(版本 18.0)?
问题描述
我是 Xamarin.Android 的新手。我正在尝试更新适用于 Android 的 Google Maps SDK(版本 18.0.0),现在可通过 Google Play 服务获得。但是,有关更新的所有文档都使用 build.gradle 并将依赖项更改为com.google.android.gms:play-services-maps:18.0.0
Xamarin 没有的依赖项。如何在 Xamarin 中更新 Maps SDK?
解决方案
Xamarin 为 Google Play 服务创建和维护 Xamarin.Android 绑定 Google 还为 Android 提供了本机映射 API。Maps API 适用于您希望更好地控制地图体验的情况。Maps API 可以实现的功能包括:
- 以编程方式更改地图的视点。
- 添加和自定义标记。
- 使用叠加层注释地图。
与现已弃用的 Google Maps Android API v1 不同,Google Maps Android API v2 是Google Play Services的一部分。Xamarin.Android 应用必须满足一些强制性先决条件才能使用 Google Maps Android API。
在使用 Maps API 之前需要执行几个步骤,包括:
获取 Maps API 密钥
安装 Google Play 服务 SDK
从 NuGet 安装 Xamarin.GooglePlayServices.Maps 包
指定所需的权限
(可选)使用 Google API 创建模拟器
有关更多详细信息,您可以查看:
和
推荐阅读
- lua - 如何在 Lua 中将 UUID 从字符串格式转换为二进制格式?
- macos - 我在启动“vagrant”时遇到了麻烦
- coq - 如何用术语的某些属性替换术语?
- mysql - EAV 查询动态字段到列
- java - Gradle - 任务':compileScala'执行失败 原因:java.lang.NoClassDefFoundError:xsbti/Logger
- powershell - 使用 PowerShell 进行串行端口通信
- echarts - 无论节点值如何,强制 echarts 的强制导向图布局保持不变
- wordpress - 如何删除 Wordpress 中的空文本框?
- excel - 从 URL 插入图像
- jira - 如何创建包含我所有 jira 问题的 scrum 仪表板