在 Google Maps v2 for Android 中自定义标记上的可点击区域 [英] Customizing clickable area on a Marker in Google Maps v2 for Android

查看:33
本文介绍了在 Google Maps v2 for Android 中自定义标记上的可点击区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用适用于 Android 的 Google Maps v2 API 并进行一些自定义叠加.首先,我创建了一个比标准标记"大得多的自定义位图.

I am currently using Google Maps v2 API for Android and doing some custom overlays. For starters, I create a custom bitmap that is quite a big larger than the standard "marker".

我知道使用较旧的 Maps API,您可以创建一个自定义叠加项来控制可点击区域,但在较新的 Maps API 上也必须可以实现.我只是希望我的自定义标记的可点击区域与我设置的自定义位图图标相同.我已经阅读了示例和文档,但找不到任何内容.任何帮助将不胜感激.

I know that using an older Maps API, you can create a custom overlayitem which controls the click-able area, but it must also be possible on the newer Maps API. I simply want my custom marker's click-able area to be the same as the custom bitmap icon I am setting it to. I have read over the examples and documentation and couldn't find anything. Any help would be appreciated.

谢谢

(这是我正在阅读的文档)

(Here is the doc I was reading)

https://developers.google.com/maps/documentation/android/marker#customize_a_marker

推荐答案

已确认.库中的错误.

我在这里创建了一个错误报告:http://code.google.com/p/gmaps-api-issues/issues/detail?id=5368

I have created a bug report here: http://code.google.com/p/gmaps-api-issues/issues/detail?id=5368

最近在库中修复了这个问题,现在应该可以正常工作了.

This has been fixed recently in the library and should work correctly now.

这篇关于在 Google Maps v2 for Android 中自定义标记上的可点击区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆