问题标签 [mylocationoverlay]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - 动画可绘制 MyLocationOverlay()
是否可以覆盖 MyLocationOverlay() 的 onDraw 方法并用其他东西替换标准闪烁的蓝色图标。我可以通过哪些方式实现这一点?
android - Android MapActivity : Couldn't get connection factory client
I'm trying to get the Map demos working, as provided in the Google API sample projects. I am using AVDs and have tried with versions 8, 10 and 11 and get the same issue.
I've generated my own debug key and added to the project. I can see the map on app start up, and can zoom in etc - so I am getting the map tiles, fine. Yes - I have the correct permissions and library set in the Manifest file (as per samples).
But, I cannot set a location on the map, either via DDMS or Telnet. I see the following error in LogCat: MapActivity : Couldn't get connection factory client
I've read numerous threads regarding this issue, but they always seem to be as a result of a bad API key; which I do not have, as I am retrieving map tiles.
So I created my own project to test this further, and am executing the following code on initialisation of my map:
I see my first log statement, but never the second, and "MapActivity : Couldn't get connection factory client" is written to LogCat at that point.
I have read that there were issues with SDK v8 emulators, so I have tried with v10 and 11 - but still no joy. I have NOT yet tried this on an actual device - will do soon.
Any help on this issue would be greatly appreciated - it's really baffling me ;)
cheers
android - Android MyLocationOverlay ...如何启用它,而不用平移地图?可能的?
我有一张地图,当用户的位置是地图的一部分时,我想显示用户的位置。但是我不希望它在每次更新时将地图视图平移到用户位置。我该怎么做呢?
似乎 enableMyLocation 会在每次 GPS 更新时自动强制地图滚动到用户位置(如果它不在屏幕上),这是我不想要的。
我真的很想利用内置的 MyLocationOverlay,而不是必须创建我自己的,它似乎告诉它在可见地图上时不断更新自己并绘制自己,但不应该滚动地图时不应该是一个简单的标志或其他东西,但我在 API 文档中看不到任何内容。
我错过了吗?或者这是不可能的?
android - 下次加载活动时 MyLocationOverlay 消失问题?
朋友们,
当我的位置相同时,我注意到一件事 MyLocationOverlay 标记未显示在屏幕上。
当我更改模拟器位置值时,我已经对其进行了测试,它出现在屏幕上我转到下一页然后再次进入同一页面并且它没有显示。是的,当我更改位置值时它再次出现。如果位置发生变化,我想始终显示它,或者没有任何人指导我如何?
这是我的代码
android - MyLocationOverlay disableMyLocation() 似乎不起作用
只是浪费了 3 个小时试图弄清楚为什么当我的地图活动暂停时 GPS 图标仍显示在通知栏中。我已将其范围缩小到与我正在使用的 MyLocationOverlay 对象有关(我还有一个 LocationListener 和一个 GpsStatus.Listener)。
如果有人知道为什么会发生这种情况,请帮忙,这样我就不会把所有的头发都拉出来。我无法发布我的应用程序,因为出现这样的电池耗尽问题。
android - 如何在谷歌地图上放置图钉以及如何在谷歌地图的对话框中获取当前地址?
我正在开发一个与谷歌地图相关的应用程序。我是谷歌地图的初学者。
我想做一个在我当前位置显示 Pin 的应用程序。当我单击该引脚时,它会显示包含我当前地址的对话框。“别针是可移动的”。当我在谷歌地图上将图钉从一个位置移动到另一个位置时,对话框会显示该位置的地址。
所以请给我想法或参考网站。
android - MyLocationOverlay.getMyLocation() 和 getLastFix() 有何不同?
查看 MyLocationOverlay - 有谁知道两者之间的区别是什么:
(除了返回类型)?getMyLocation() 方法是否仅在找到位置后才返回值,并且 getLastFix() 将返回缓存的最后修复,可能来自不同的会话?
android - 如何使用自定义指南针图像android
首先让我说我看过这个帖子:如何替换 MyLocationOverlay 的 Compass 图像?
根据该线程,它告诉我无法覆盖该图标。
没有大碍。也就是说,我正在尝试找出一种方法来实现这一点。
我是否正确地说我需要创建自己的自定义画布来简单地绘制图标并旋转它并覆盖另一个扩展 MyLocationOverlay 的自定义类中的 drawcompass 方法?
如果这是正确的,我如何创建这个图标的自定义画布/旋转它?(我没有在 android 操作系统中绘图的经验)。
android - Android:将 MyLocationOverlay.enableMyLocation 显示为指南针
MyLocationOverlay.enableMyLocation
关于 a 中的方法的一个小问题MapView
。
在原始的 Goggle 地图应用程序中,位置显示为指南针,但是,如果我MyLocation
在 a 中启用 - 功能,MapView
它只会显示这个蓝色旋钮。
如何用原始 Maps-App 中的指南针替换这个蓝色旋钮?
在上图中,您可以看到我的应用程序。用户的位置显示为这个蓝色的小旋钮。
最后一张图片来自谷歌地图。用户位置显示为移动的罗盘箭头。
这个箭头就是我想要的。
是否需要任何进一步的信息来解决这个问题?
android - 从 onLocationChanged() 更新 MapView
在 onLocationChanged() 时绘制路线时遇到问题。
所以我要做的是:我在地图上有一个图钉(基于 carOverlayItem),MyLocationOverlay 显示了我当前的位置。我想在这两点之间画一条路线。因此,每次当用户移动时(我们接收到位置并触发 MyLocationOverlay.onLocationChanged() 方法),我都会在 klm 文件中从 Google 获取坐标,对其进行解析并用 GeoPoint 对象填充数组。在我尝试遍历该 GeoPoint 数组并将使用 Overwritten draw() 方法添加到 MapView 之后
这是我的 GMapRouteOverlay 类
我已经阅读了一些互联网并想出了一个想法,即我需要在 onLocationChanged() 时填充 routeNodes 变量,然后调用 mapView.invalidate() 以在 onDraw() MapView 方法中绘制路线,但遇到了一个我没有的问题据我了解,知道如何传输 routeNodes 变量和意图不是一个选项。
另外,可能是带有 onLocationChanged() 方法的 MyLocationOverlay 不是在 UI 线程中运行的,这就是我无法在地图上绘制的原因,但在这种情况下,我认为我应该得到一个错误,它不会被抛出。我很困惑,可以找到任何解决方案。
任何帮助,将不胜感激。
谢谢。